> Depends what you mean by difficult. In order to get Typo's themes
> working with Rails 2.0, I ended up doing:
>
>   @@view_paths[self.class.name] =
>     [path_to_theme] +
>     @@view_paths["ActionController::Base"]
>
> in a before filter and it worked like a charm.

In my proposed patch I removed the class variables in favor of class
instance variables.  Now you'd do:

self.view_paths = [path_to_theme] + superclass.view_paths

Though I wonder if append/prepend should do that?  In my patch:

def prepend_view_path(path)
  view_paths.unshift(*path)
end

How about:

def prepend_view_path(path)
  self.view_paths = superclass.view_paths.dup if @view_paths.nil?
  view_paths.unshift(*path)
end

class ActionController::Base
  self.view_paths = [default]
end

class FooController
  prepend_view_path custom_foo_path
end

-- 
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to