Ruby on Rails Sunday, October 25, 2015

On 25 October 2015 at 14:59, Deepak Sharma <deeky.sharma@gmail.com> wrote:
> On Sun, Oct 25, 2015 at 7:10 PM, Colin Law <clanlaw@gmail.com> wrote:
>> The usual way to do this would be by rendering partials. You can
>> render different partials dependent on the context. Alternatively,
>> instead of rendering the scaffolds as partials from the dashboard,
>> render the dashboard as partials from the scaffold. Often this is the
>> simpler approach.
>
> Rendering dashboard partial sounds good. But I leads to huge amount of
> CSS code and hard coding.

In fact I didn't write what I meant to write. Put the rendering of
the dashboard partials in layouts/application.html.erb (or another
layout used by relevant views if not everything needs the dashboard)
and yield from there for the contents.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuhcUY_q008Fi8V%3DsxSWnns08Htcb%2BeEBzZnZyzW%2BWRtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment