this is my error:

Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17
00:57:56) [POST]
  Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"},
"commit"=>"Add Comment", "post_id"=>"19",
"authenticity_token"=>"B5dll5fTaDO+ZrEs1S0KkYsmK8VMzCOeDEf731w21zY=",
"captcha"=>"asdasd", "_"=>""}

SyntaxError
(/Users/webstic/Sites/weblog/app/controllers/comments_controller.rb:11:
syntax error, unexpected kELSE, expecting kEND
      else
          ^):


this is my code:

class CommentsController < ApplicationController
  include SimpleCaptcha::ControllerHelpers

  def create
    if simple_captcha_valid?
    @post = Post.find(params[:post_id])
    @comment = @post.comments.create!(params[:comment])
    respond_to do |format|
      format.html { redirect_to @post }
      format.js
      else
        flash[:notice] = "please right down the image verification"
      end
    end
  end
end


any suggestions ?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to