开发者

why remote button_to is not working for me?

remote botton_to is not working

In the index page, i have code

        <%= button_to "Edit User Info", 
                      :method => :edit_user_info,
                      :remote => true  
        %>

in the controller, i am testing it for printing a log message, but it didnt work for me

def edit开发者_StackOverflow中文版_user_info
    logger.debug "===========================2"
    redirect_to my_account_path
end

so, how can i fix it...thx


The :method attribute takes a symbol of a HTTP verb such as get, post, put or delete, not a controller action. If you want to call a specific action within a controller, you could use the :action attribute (and possibly the :controller attribute as well).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜