To respond to my own question...
def show
hobo_show |expects|
expects.json { render :json => {...} }
expects.html
end
end
Now, @model is defined in the json part and some permission checking (at least
at the record level) has been done.
Henry
On March 29, 2011 09:25:54 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?
>
> For that matter, does hobo create a JSON/XMS restful interface (parallel to
> the html one)?
>
> Regards,
> Henry
--
Henry Baragar
Instantiated Software
--
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.