search for: find_by_firstnam

Displaying 3 results from an estimated 3 matches for "find_by_firstnam".

Did you mean: find_by_firstname
2006 Jan 07
3
Beginner Questions parameter passing failing
...;) %></td> <%= end_form_tag %> </table> Which simply submits a firstname to my login action which tries to match it up to an entry in my User model (which has firstname, lastname, email, password fields) def login @user = User.find_by_firstname(params[:firstname]) end However, when I try and display the resulting @user.firstname in the login view I always get the following error. NoMethodError in Useradmin#login Showing app/views/useradmin/login.rhtml where line #4 raised: You have a nil object when you...
2006 Jan 07
1
Difference in find_by
...is between the "@params" and "params". (I know the first is a instance variable and the second is a ''normal'' variable. What does this mean in pratical terms? @contact = Contact.find(@params[''contact''][''id'']) @user = User.find_by_firstname(params[:user][:firstname]) Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..." My $Grtz =~ Gerard; ~ :wq!
2007 Nov 17
2
ActionMailer 501: sender address must contain a domain
...s my method: [code] def confirm(customer) @subject = ''Sign up verification'' @body["customer"] = customer @recipients = customer.email @from = ''SilverSky'' @sent_on = Time.now end def send_mail customer = Customer.find_by_firstname("erkan1") email = CustomerMailer.create_confirm(customer) email.set_content_type("text/html") if CustomerMailer.deliver(email) render(:text => "Thank you" ) end [/code] Any help would be greatly appreciated! This is getting me down! -- Posted vi...