Suggestion; a mechanism to specify asset path for controller (or specified actions)

101 views
Skip to first unread message

kuraga

unread,
Aug 18, 2012, 6:58:48 AM8/18/12
to rubyonra...@googlegroups.com
Good day!

Rails have layout method that allows you to specify a layout for controller or some it actions. So we can specify a template (HTML) for each action.

But not only HTML specifies page's design (view) but CSS and JS, also. Asset, in Rails terms.

But can specify an asset for each action (by standard Rails' mechanism, without dancing-with-bells :))? If not, I think it's a good idea to have it - to have a possibillity to change the whole page's design.

Thanx.

Jonathan Lozinski

unread,
Aug 18, 2012, 8:21:32 AM8/18/12
to rubyonra...@googlegroups.com
Couldn't this be simply achieved by using a layout which uses different CSS files?

So

Layout1 loads CSS/desktop.css
Layout2 loads CSS/mobile.css

For example

Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/ofufv0nnQSEJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.

Alexander Kurakin

unread,
Aug 18, 2012, 8:29:10 AM8/18/12
to rubyonra...@googlegroups.com
What about images? Ok, I said: it's possible. Is it possible with relax? For layouts - possible. But for assets?

суббота, 18 августа 2012 г., 16:21:32 UTC+4 пользователь mrloz написал:
Reply all
Reply to author
Forward
0 new messages