Brian Ploetz wrote:
> your filter works well until I can get around to doing this I suppose.
Actually, your filter is problematic for AJAX actions which do a render
:partial => 'blah'
I've tweaked it to this, which seems to do the trick:
def set_default_format
if !request.xhr?
params[:format] ||= 'html'
end
end
This works well for my particular set up, as most of my AJAX actions
render partials, so if you're doing something like format.js and using
RJS, you might need to tweak further.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---