| Module | Responders::CollectionResponder |
| In: |
lib/responders/collection_responder.rb
|
This responder modifies your current responder to redirect to the collection page on POST/PUT/DELETE.
Returns the collection location for redirecting after POST/PUT/DELETE. This method, converts the following resources array to the following:
[:admin, @post] #=> [:admin, :posts] [@user, @post] #=> [@user, :posts]
When these new arrays are given to redirect_to, it will generate the proper URL pointing to the index action.
[:admin, @post] #=> admin_posts_url [@user, @post] #=> user_posts_url(@user.to_param)