search for: deliver_send_an_email

Displaying 2 results from an estimated 2 matches for "deliver_send_an_email".

2006 Aug 16
3
Validate your forms with a table-less model
...o a database table. My code in the controller is this at the moment and this works but if the validation fails it just displays the flash message i have provided, not highlighting the boxes in red. def contact @contact = Contact.new(params[:contact]) if @contact.valid? OrderMailer::deliver_send_an_email() # notice the ''deliver_'' prefix flash[:notice] = ''Query was successfully created.'' redirect_to :action => ''contactus'' else flash[:notice] = ''Query was not successfully created.'' redirect_to :act...
2006 Aug 15
0
ActionMailer
...an_email() @recipients = "myadress@isp.co.uk" @from = "myaddress@isp.co.uk" @subject = "Ruby Test" @body = "The Body" end end View: send_an_email.rhtml <p>Email was sent!.</p> Controller: Admin.rb def sendmail OrderMailer::deliver_send_an_email() # notice the ''deliver_'' prefix end environment.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "auth.smtp.1and1.co.uk", :port => 25, :user_name => "myusername", :password => "mypasswor...