Changeset 5027 for websites

Show
Ignore:
Timestamp:
01/20/08 11:59:52 (6 years ago)
Author:
norio_s
Message:

add lists&feeds resources

Location:
websites/feedlist
Files:
37 added
6 modified
1 moved

Legend:

Unmodified
Added
Removed
  • websites/feedlist/app/models/user.rb

    r3997 r5027  
    11require 'digest/sha1' 
    22class User < ActiveRecord::Base 
     3  has_many :lists 
     4   
    35  # Virtual attribute for the unencrypted password 
    46  attr_accessor :password 
  • websites/feedlist/app/views/layouts/application.html.erb

    r3997 r5027  
    44    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    55    <title>feedlist</title> 
     6    <%= auto_discovery_link_tag(:atom, formatted_lists_url(:atom))%> 
     7    <%= stylesheet_link_tag 'scaffold' %> 
    68  </head> 
    79 
  • websites/feedlist/app/views/users/edit.html.erb

    r3997 r5027  
    1919  </p> 
    2020  <p> 
     21    <label for="password">Password (for API access)</label><br/> 
     22    <%= f.password_field :password %> 
     23  </p> 
     24  <p> 
     25    <label for="password_confirmation">Confirm Password</label><br/> 
     26    <%= f.password_field :password_confirmation %> 
     27  </p> 
     28 
     29  <p> 
    2130    <%= submit_tag 'Update Profile', :or => link_to( "cancel", "/") %> 
    2231  </p> 
  • websites/feedlist/config/initializers/mime_types.rb

    r3618 r5027  
    44# Mime::Type.register "text/richtext", :rtf 
    55# Mime::Type.register_alias "text/html", :iphone 
     6Mime::Type.register_alias "text/xml", :opml 
  • websites/feedlist/config/routes.rb

    r3894 r5027  
    11ActionController::Routing::Routes.draw do |map| 
     2  map.root :controller => 'lists' 
     3  map.resources :lists, :has_many => :feeds 
     4 
     5  map.resources :feeds 
     6 
    27  map.resource :session, :collection => { :begin => :post, :complete => :get } 
    38   
  • websites/feedlist/db/schema.rb

    r3898 r5027  
    1010# It's strongly recommended to check this file into your version control system. 
    1111 
    12 ActiveRecord::Schema.define(:version => 1) do 
     12ActiveRecord::Schema.define(:version => 3) do 
     13 
     14  create_table "feeds", :force => true do |t| 
     15    t.string   "title" 
     16    t.string   "uri" 
     17    t.integer  "list_id" 
     18    t.datetime "created_at" 
     19    t.datetime "updated_at" 
     20  end 
     21 
     22  create_table "lists", :force => true do |t| 
     23    t.string   "title" 
     24    t.text     "description" 
     25    t.boolean  "share",       :default => true 
     26    t.boolean  "public",      :default => true 
     27    t.integer  "user_id" 
     28    t.datetime "created_at" 
     29    t.datetime "updated_at" 
     30  end 
    1331 
    1432  create_table "open_id_associations", :force => true do |t|