show_response is new to 1.4. Not having it was OK because we didn't have any controls that used it for AJAX. In 1.4 components like filter-menu support AJAX, so show_response was added.
If you're not doing ajax, and you don't need/want the responds_with, doing nothing and falling through will still work. Bryan On Thu, Sep 6, 2012 at 9:39 AM, Matt Jones <[email protected]> wrote: > > On Sep 4, 2012, at 5:34 PM, Bryan Larsen wrote: > >> I plan on switching over all of the model_controller responses to use >> respond_with(this) or the appropriate equivalent. >> >> this means that you can simply add: >> >> respond_to :html, :xml, :json >> >> to your controllers and it will give you a nice xml and json API interface. >> >> This will break code that uses a pattern like this: >> >> def show >> hobo_show >> render :something >> end >> >> The "right" way to customize your renders is to use this pattern: >> >> def show >> hobo_show do >> if params[:funky] >> render :funky >> else >> show_response >> end >> end >> end >> >> Does anybody have any objections to this change going in to Hobo or >> see any other drawbacks? > > I like this idea - I've been promising to "get around to it" for quite a > while. :) > > Is show_response a new thing? Back in 1.0 I would always get the correct > behavior from just not rendering anything in the block. > > --Matt Jones > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" 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/hobousers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
