Controller
Ruby
code posted
created at 25 Aug 21:11
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
class ContactsController < ApplicationController layout 'site' def new @title = "Contact" @contact = Contact.new end def create @title = "Contact" @contact = Contact.new params[:contact] if @contact.valid? @contact.deliver flash[:notice] = "Contact Message Sent" redirect_to root_url else render :action => 'new' end end end |
421 Bytes in 2 ms with coderay