diff options
| author | mo k <mo@mokhan.ca> | 2012-05-17 06:58:47 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-05-17 06:58:47 -0600 |
| commit | a72eae9ec401a6fbf0675d681858ea3fdfee40e7 (patch) | |
| tree | b17292384572bd248e0b636bec5a6e0de849fc1e /app | |
| parent | 224be5744f3929658fd3da0e85e9affc4b21b34c (diff) | |
add website property to the User model and create migration.
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/registrations_controller.rb | 5 | ||||
| -rw-r--r-- | app/models/user.rb | 2 | ||||
| -rw-r--r-- | app/views/registrations/edit.html.erb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 8eed79dd..d50fbe46 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -3,6 +3,11 @@ class RegistrationsController < Devise::RegistrationsController super session[:omniauth] = nil unless @user.new_record? end + + #def update + #logger.log(params) + #super + #end private diff --git a/app/models/user.rb b/app/models/user.rb index 11fb3ac8..1cf4c8d1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,7 +2,7 @@ class User < ActiveRecord::Base validates :name, :presence => true has_many :authentications devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable - attr_accessible :name, :email, :password, :password_confirmation, :remember_me + attr_accessible :name, :email, :website, :password, :password_confirmation, :remember_me has_many :creations, :dependent => :destroy has_many :favorites, :dependent => :destroy diff --git a/app/views/registrations/edit.html.erb b/app/views/registrations/edit.html.erb index 0638c515..9e1cff65 100644 --- a/app/views/registrations/edit.html.erb +++ b/app/views/registrations/edit.html.erb @@ -37,7 +37,7 @@ </div><!-- /control-group --> <div class="control-group"> <%= f.label :website, :class => "control-label" %> - <div class="controls"> <%= f.password_field :website, :class => "input-xlarge" %> </div> + <div class="controls"> <%= f.text_field :website, :class => "input-xlarge" %> </div> </div><!-- /control-group --> <div class="form-actions"> <input type="submit" class="btn btn-primary" value="Save changes" /> |
