On Sat, Mar 1, 2014 at 4:58 PM, mksys <m...@grandprix.com> wrote:
> Is there a way to do what would be equivalent to a css media query in a
> controller in order to decide which erb template to use when rendering a
> page?

No, and maybe.

First, go to <http://www.w3.org/TR/css3-mediaqueries/> and see the
"media features" on which media queries are based.

Then examine a few http requests from a browser -- do you see any
"media features" values in the request? If not, the answer is "no".

However, if you control the page being linked from, you can certainly
pack any data into the request you want, though that has downsides
as well (sharing URLs, bookmarking).

HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
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+unsubscr...@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/CACmC4yDEK50PR6UQPgXDphtOPocexN3bsOmK4rBM%3DQWkbAaFbA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to