actioncontroller
Rails - Nested Objects Deletion
I want to delete the nested object book, that is owned by a user. In the user#show page appears all the books related to that user. Besides each book there is a link to delete it. Here is my code:[详细]
2023-03-09 13:14 分类:问答default_url_options and rails 3
As ActionController::Base#default_url_options is deprecated, I wonder how to set default url开发者_如何转开发 options in rails3. The default url options are not static but dependent of the current req[详细]
2023-03-08 06:35 分类:问答Namespaced Controller cannot find model virtual attribute method
I get the following error with the supplied code. undefined method `password\' for #<User:0x00000002e66980>[详细]
2023-03-05 15:47 分类:问答Error Rendering with Nested Routes
I am trying to maintain a pretty URL when having a user messaging with failed validation. I have a routes file that looks like the following:[详细]
2023-02-25 04:24 分类:问答How to set config.action_controller.default_url_options = {:host = '#''} on per environment basis
Right now I\'m using this which works for the development host, but I have to manually change the {:host => \"\"} code when I move to production.[详细]
2023-02-25 03:55 分类:问答How to get segment keys from a Rails 3 route?
I need to determine the number of route segment keys in the current path for an application I\'m working on, and despite digging around for a bit in the related Rails 3 source files, I can\'t figure i[详细]
2023-02-24 06:22 分类:问答Getting access to :not_found, :internal_server_error etc. in Rails 3
It looks like ActionController::StatusCodes has been removed from Rails 3. I used synonyms for HTTP status codes such as[详细]
2023-02-22 13:40 分类:问答after_commit for rails controller
I know that an after_commit callback is provided for ActiveRecord objects in Rails 3.However, I would like to get access to this functionality in a Rails Controller.[详细]
2023-02-21 04:16 分类:问答Rails 3 - extend ActionController
I am trying to implement logic captcha in my app. I have scaffolded simple TextCaptcha to store question and answer in DB.[详细]
2023-02-10 19:22 分类:问答Rails 3: Proper way to Delete resource using respond_with
I\'m trying to DRY up a controller by incorporating respond_with. When I do, following some instructions in a Railscast, I get things mostly working. The problem lies in the redirect after deleting a[详细]
2023-02-10 06:41 分类:问答