Request format.all

17 views
Skip to first unread message

Antonio Tapiador del Dujo

unread,
May 10, 2011, 6:50:12 AM5/10/11
to rubyonra...@googlegroups.com, José Valim, Víctor Sánchez
Requesting /attachments/1.all does not work in Rails 3. It was changed here:

https://github.com/rails/rails/commit/7e280c3bff8ac25f1c1938aeaeb1d0b4c0fbb726

The use case is a show action such as:

def show
@attachment = Attachment.find(params[:id])

respond_to do |format|
format.html
format.any { download }
end
end

The pros of using this approach is take advantage of Cancan and
InheritedResources defaults. What do you thing about it?

Reply all
Reply to author
Forward
0 new messages