Jean-Sébastien D.
2012-Aug-15 01:45 UTC
Devise access customer information without password
I am trying to customize my account with devise. However I do not want to provide a confirmation password on every details. Therefore I have created a new controller has mentionned on the following tutorial: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-account-without-providing-a-password. This seem to work, however i have different sections such has follow General Security Interest Each section render a new form in Settings/_general.html.erb ( partial renders ) Here how security looks <%= form_for(@customer) do |f| %> <fieldset> <div class="cus"> <%= f.label :email %> <%= f.text_field :email %> </div> <div class="customer_edit_confirmation"> <%= f.label :email_confirmation, "Confirm Password" %> <%= f.text_field :email_confirmation %> </div> </fieldset> <div class="customer_edit_button"> <%= f.submit "Save changes", class: "button_accept" %> </div> <% end %> However when seeing the view at http://localhost:3000/settings/1/edit#account I get the following errors NoMethodError in Settings#edit Showing /home/jean/rail/voyxe/app/views/settings/_email.html.erb where line #1 raised: undefined method `customer_path'' for #<#<Class:0xb49b1838>:0xb49b0244> Extracted source (around line #1): 1: <%= form_for(@customer) do |f| %> 2: <fieldset> 3: <div class="cus"> 4: <%= f.label :email %> I don''t understand where customer_path his from. Also an extra how should i define a safe and secure path to access settings/current_customer.id/edit in the route.rb file. Thanks in advance!!! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.