I am trying to implement restful_authentication plugin in my rails
application. But my user model contains extra fields like country_id,
state_id, city_id, phone_number, status_id, gender etc. Is it possible
to add additional fields along with restful_authentication plugin? I was
not able to store the additional fields. pls help. very urgent. This is
my first project in ROR
Thanks in advance.
I am trying to implement restful_authentication plugin in my rails
application. But my user model contains extra fields like country_id,
state_id, city_id, phone_number, status_id, gender etc. Is it possible
to add additional fields along with restful_authentication plugin? I was
not able to store the additional fields. pls help. very urgent. This is
my first project in ROR
You’ll need to make a migration to add the extra columns to your users
table. restful_authentication generates a user model/views/controller.
So you can edit those to accept your extra fields.
I am trying to implement restful_authentication plugin in my rails
application. But my user model contains extra fields like country_id,
state_id, city_id, phone_number, status_id, gender etc. Is it possible
to add additional fields along with restful_authentication plugin? I was
not able to store the additional fields. pls help. very urgent. This is
my first project in ROR
You’ll need to make a migration to add the extra columns to your users
table. restful_authentication generates a user model/views/controller.
So you can edit those to accept your extra fields.
Thanks for the reply.
Created the migration and added extra fields. The error coming at the
time of saving the data to the user model. ie I am not getting the
values in the insert query (got the insert statement from the log
file).I am getting “null” for the extra fields in the insert query
Created the migration and added extra fields. The error coming at the
time of saving the data to the user model. ie I am not getting the
values in the insert query (got the
Are you sure you’re passing the extra fields to the model?
Have you tried opening a console and manually creating a user model?
That would tell you if the problem’s in your model or in your
controller/view
–
Starr H.
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/
Thanks again
Yes , I am sure, that I am passing the extra fields to the model.
........ <% end %>
and in my controller users_contrller in the new @user = User.new and in
create actions I just wrote @user.save. The error coming in country_id
cant' be null. since I had given the database constraint that null value
is not allowed. while i am looking the insert statement in place of
country_id value is null. but when I tried to print the
params[:user][:country_id] the value is getting. Pls help. since I had
spend more time and still vein .
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.