We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i am trying to update Divice so my Usermodel has a firstname, lastname, and not just a email and password
so i created a migration
db/migrate/20120521142938_add_username_fistname_lastname_to_users.rb
class AddFistnameLastnameToUsers < ActiveRecord::Migration def change add_column :users, :fistname, :string add_column :users, :lastname, :string end end
i also did
rails generate devise:install
To be able to modify the views
This is the new account view app/views/devise/registrations/new.html.erb
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= devise_error_messages! %>
<%= render :partial => "devise/shared/links" %>
my Error When i submit this form i get a error that reads
ActiveModel::MassAssignmentSecurity::Error in Devise::RegistrationsController#create
Can't mass-assign protected attributes: fistname, lastname
Rails.root: /Users/moiseszaragoza/Sites/test_divice Application Trace | Framework Trace | Full Trace
Request
Parameters:
{"utf8"=>"✓", "authenticity_token"=>"n2Ee9vXZWFa895MSVzBblkPjcbkCX4A4yvs/EV2qxwI=", "user"=>{"email"=>"mZaragoza@circletechfl.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "fistname"=>"Moises", "lastname"=>"Zaragoza"}, "commit"=>"Sign up"}
Show session dump
Show env dump Response
Headers:
None
The text was updated successfully, but these errors were encountered:
Please use the mailing list for questions.
Sorry, something went wrong.
No branches or pull requests
i am trying to update Divice so my Usermodel has a firstname, lastname, and not just a email and password
so i created a migration
db/migrate/20120521142938_add_username_fistname_lastname_to_users.rb
class AddFistnameLastnameToUsers < ActiveRecord::Migration
def change
add_column :users, :fistname, :string
add_column :users, :lastname, :string
end
end
i also did
rails generate devise:install
To be able to modify the views
This is the new account view
app/views/devise/registrations/new.html.erb
Sign up
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<%= f.email_field :email %>
<%= f.password_field :password %>
<%= f.password_field :password_confirmation %>
<%= f.text_field :fistname %>
<%= f.text_field :lastname %>
<%= render :partial => "devise/shared/links" %>
my Error
When i submit this form i get a error that reads
ActiveModel::MassAssignmentSecurity::Error in Devise::RegistrationsController#create
Can't mass-assign protected attributes: fistname, lastname
Rails.root: /Users/moiseszaragoza/Sites/test_divice
Application Trace | Framework Trace | Full Trace
Request
Parameters:
{"utf8"=>"✓",
"authenticity_token"=>"n2Ee9vXZWFa895MSVzBblkPjcbkCX4A4yvs/EV2qxwI=",
"user"=>{"email"=>"mZaragoza@circletechfl.com",
"password"=>"[FILTERED]",
"password_confirmation"=>"[FILTERED]",
"fistname"=>"Moises",
"lastname"=>"Zaragoza"},
"commit"=>"Sign up"}
Show session dump
Show env dump
Response
Headers:
None
The text was updated successfully, but these errors were encountered: