hello every body i have a simple question . i have this form : <%= form_tag :action=>''password'' %> Password:<%= password_field :p , :pass1 , :size=>''20''%> Again:<%= password_field :p , :pass2 , :size=>''20''%> how can i access the contents of the two field in ruby ? by doing this : ch1=params[:p][:pass1] i have an error You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] thanks :) -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10-09-19 04:18 PM, abdelkarim wrote:> hello every body i have a simple question . > > i have this form : > > <%= form_tag :action=>''password'' %> > > Password:<%= password_field :p , :pass1 , :size=>''20''%> > Again:<%= password_field :p , :pass2 , :size=>''20''%> > > > how can i access the contents of the two field in ruby ? > > > by doing this : ch1=params[:p][:pass1] i have an error > > You have a nil object when you didn''t expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.[] > > > thanks :) >give this a try: <%= form_tag( :action => ''search'' ) do %> Password:<%= password_field_tag :pass1, nil , :size=>''20''%><br/> Password:<%= password_field_tag :pass2, nil , :size=>''20''%><br/> <%= submit_tag %> <% end %> then you can access the values from you controller, like this: ch1 = params[:pass1] ch2 = params{:pass2] -- Kind Regards, Rajinder Yadav -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
correction: sorry for the typo, you can access the values from your controller like this: ch1 = params[:pass1] ch2 = params[:pass2] -- Kind Regards, Rajinder Yadav -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dont forget to user ssl -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thanks all :) but i dont have any idea about using ssl :( On 20 sep, 07:10, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> dont forget to user ssl-- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Whenever you have a page that sends confidential information back and forth you have to encrypt it, because when a user hits submit, the html goes back to the server in pure text and can be read by anyone along the way to the server. What is done is that PKI infrastructure is used to ensure no one in the network can intersect the data an read it. Google SSL, TLS , PKI, Certificates, CA and encryption. HINT: pages with ssl show a little lock in the status bar of the browser -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.