Permalink
Browse files

add heading and introduction to users

  • Loading branch information...
1 parent 92698b7 commit e94eeb1348e12fea355215aaf86609cef0f33776 @tkawa committed Apr 29, 2012
View
@@ -1,6 +1,6 @@
# coding: utf-8
class User < ActiveRecord::Base
- # attr_accessible :title, :body
+ attr_accessible :heading, :introduction
has_many :sites
private
@@ -12,24 +12,12 @@
<% end %>
<div class="field">
- <%= f.label :provider %><br />
- <%= f.text_field :provider %>
+ <%= f.label :heading %><br />
+ <%= f.text_field :heading %>
</div>
<div class="field">
- <%= f.label :uid %><br />
- <%= f.text_field :uid %>
- </div>
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :screen_name %><br />
- <%= f.text_field :screen_name %>
- </div>
- <div class="field">
- <%= f.label :image %><br />
- <%= f.text_field :image %>
+ <%= f.label :introduction %><br />
+ <%= f.text_area :introduction %>
</div>
<div class="actions">
<%= f.submit %>
@@ -0,0 +1,6 @@
+class AddHeadingAndIntroductionToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :heading, :string
+ add_column :users, :introduction, :text
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120429021520) do
+ActiveRecord::Schema.define(:version => 20120429054335) do
create_table "sites", :force => true do |t|
t.string "url", :null => false
@@ -28,8 +28,10 @@
t.string "name"
t.string "screen_name"
t.string "image"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "heading"
+ t.text "introduction"
end
end

0 comments on commit e94eeb1

Please sign in to comment.