Class name to view path
        Posted  
        
            by Alexey Poimtsev
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Alexey Poimtsev
        
        
        
        Published on 2010-03-23T21:02:52Z
        Indexed on 
            2010/04/26
            8:43 UTC
        
        
        Read the original article
        Hit count: 253
        
ruby-on-rails
|actionview
Hi,
I have a RoR application and model SomeModel. I have views for this model and I want to know - is there any method to get the view's path? Of course I can use for this model instance
m = SomeModel.new
v = m.class.class_name.pluralize.downcase
It's working, but maybe you know a better way? :)
© Stack Overflow or respective owner