Hi, everyone, this is my first post here! I have a "HomeController" that has an "index" method.
I have 4 views for this method: - index.html.erb - index.mobile_lofi.erb - index.mobile_hifi.erb - index.iphone.erb I also have the following mimetypes defined: Mime::Type.register_alias "text/html", :mobile_lofi Mime::Type.register_alias "text/html", :mobile_hifi Mime::Type.register_alias "text/html", :iphone Now, the content (instance variables) these views need is almost the same among them. I have a method "device_type?" that returns one of the [:html, :mobile_lofi, :mobile_hifi, :iphone] based on the User-Agent string. How do I render the view based on the result of the "device_type?" method? I am using Rails 2.3.3. Thank you, Gleb -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---