search for: controllerhelpers

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

2009 Aug 16
5
any help with captcha in my comments ?
...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 verific...
2008 Dec 07
0
boolean button helper
I don''t have a blog, but wanted to share this little bit of code with other semi-beginners like myself who are still learning to take advantage of rails features. Selecting an attribute with a boolean switch is a common pattern in forms. You can do it with a check box, but radio buttons are more expressive in some situations and better convey to the user that they are making a mandatory
2009 Mar 01
1
sortable_element helper query
Is it possible to call helper method instead of controller action while using sortable_element helper method? Ref: http://api.rubyonrails.org/classes/ActionView/Helpers/ScriptaculousHelper.html The url field in the example is like controller/action type. Can we call ControllerHelper method instead? Because we need to save the sorted element in the database, so my guess was to call a method in a