Forum: Rails deployment controller mail method

86d81537f032adc37d13a0ae52c4e67a?d=identicon&s=25 Mark Preston (markp)
on 2009-08-18 00:46
I have the following method in my controller:

  def send_contact_request
      @contact = Contact.new(params['contact'])
        if @contact.save
            begin
            Mailer::deliver_contact_message(@contact)
            flash[:notice] = "Success!”
            redirect_to :action => "contact"
            rescue
            flash[:notice] = “It broke!”
            render :action=>"contact"
            end
            else
            render :action=>"contact"
            end
        end

    end

When I try to run the project, I get the following error:

C:/rubyapps/fcalc/app/controllers/numbers_controller.rb:96: syntax
error, unexpected tIDENTIFIER, expecting kEND
      redirect_to :action => "contact"
                                     ^
C:/rubyapps/fcalc/app/controllers/numbers_controller.rb:99: syntax
error, unexpected tIDENTIFIER, expecting kEND
      render :action=>"contact"
                              ^
C:/rubyapps/fcalc/app/controllers/numbers_controller.rb:102: syntax
error, unexpected tIDENTIFIER, expecting kEND
      render :action=>"contact"
                              ^
C:/rubyapps/fcalc/app/controllers/numbers_controller.rb:102:
unterminated string meets end of file
C:/rubyapps/fcalc/app/controllers/numbers_controller.rb:102: syntax
error, unexpected $end, expecting kEND


I sure it's  staring me in the face, but I have been looking at it so
long I can't see it
86d81537f032adc37d13a0ae52c4e67a?d=identicon&s=25 Mark Preston (markp)
on 2009-08-18 01:35
ok, figured it out.
This topic is locked and can not be replied to.