On 23 December 2011 01:32, Jeremy Rottman
<rottmanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> This post is a two part post, I apologize for the length.
>
> So far I have been able to wrap my brain around RoR fairly well. But
> this certain scenario, which I do plan to make use of quite a bit, has
> me a little stumped.
>
> Currently in my application I have a view setup named
> dashboard.html.erb. This view requires a high level of customization
> by the user, they will need to have the ability to add and remove
> "widgets"(partials) as they see fit. These partials are not
designed
> to use data from the dashboard controller.
>
> My first question is, what would be the best practice way to get data
> into these partials? My initial thought was to use a ajax get request
> for each partial that is being displayed, however this seems like
> unnecessary overhead.
I would use a before_filter in the controller to populate the data for
the partials.
>
> My second question is, when using a controller that does not require a
> specific view, but instead returns json data, what are the best
> practices for creating this controller action?
I don''t understand the question, what do you mean by "creating the
controller action"?
Colin
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.