On Mar 29, 2011, at 9:25 AM, Henry Baragar wrote:

> Hello,
> This is on a new thread because I have deleted the message where Bryan Larsen 
> posted this snippet:
>       def show
>        respond_to do |expects|
>          expects.json { render :json => {...} }
>          expects.html { hobo_show }
>        end
>       end
> Is @model available in the json block?  If not, how do we get hobo to build 
> @model rather than having to explicitly program it?

hobo_show takes a block that works just like the respond_to block, so you can 
do this:

def show
  hobo_show do |expects|
    ...
  end
end

Inside this block, 'this' etc will work as expected.

--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.

Reply via email to