<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">137</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-10-28T12:32:08-10:00</created-at>
  <creator-id type="integer">26784</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">39</number>
  <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
  <priority type="integer">37190</priority>
  <project-id type="integer">10178</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag>2.2rc1 actionview::templatefinder template view</tag>
  <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
  <updated-at type="datetime">2008-11-09T06:14:01-10:00</updated-at>
  <user-id type="integer">137</user-id>
  <user-name>James Adam</user-name>
  <creator-name>dstamat (at elctech)</creator-name>
  <assigned-user-name>James Adam</assigned-user-name>
  <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
  <original-body>TemplateFinder has been phased out in Rails, and some new conventions are in place.  See similar issue here:
http://groups.google.com/group/communityengine/browse_thread/thread/5e476a0c2ea44b45

Loading our application up dies in plugin.rb, on the reference to ActionView::TemplateFinder.process_view_paths(view_path), as ActionView::TemplateFinder no longer exists.</original-body>
  <latest-body>TemplateFinder has been phased out in Rails, and some new conventions are in place.  See similar issue here:
http://groups.google.com/group/communityengine/browse_thread/thread/5e476a0c2ea44b45

Loading our application up dies in plugin.rb, on the reference to ActionView::TemplateFinder.process_view_paths(view_path), as ActionView::TemplateFinder no longer exists.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;TemplateFinder has been phased out in Rails, and some new
conventions are in place. See similar issue here: &lt;a href=&quot;http://groups.google.com/group/communityengine/browse_thread/thread/5e476a0c2ea44b45&quot;&gt;
http://groups.google.com/group/c...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Loading our application up dies in plugin.rb, on the reference
to ActionView::TemplateFinder.process_view_paths(view_path), as
ActionView::TemplateFinder no longer exists.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>TemplateFinder has been phased out in Rails, and some new conventions are in place.  See similar issue here:
http://groups.google.com/group/communityengine/browse_thread/thread/5e476a0c2ea44b45

Loading our application up dies in plugin.rb, on the reference to ActionView::TemplateFinder.process_view_paths(view_path), as ActionView::TemplateFinder no longer exists.</body>
      <body-html>&lt;div&gt;&lt;p&gt;TemplateFinder has been phased out in Rails, and some new
conventions are in place. See similar issue here: &lt;a href=&quot;http://groups.google.com/group/communityengine/browse_thread/thread/5e476a0c2ea44b45&quot;&gt;
http://groups.google.com/group/c...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Loading our application up dies in plugin.rb, on the reference
to ActionView::TemplateFinder.process_view_paths(view_path), as
ActionView::TemplateFinder no longer exists.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-28T12:32:09-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>new</state>
      <tag>2.2rc1 actionview::templatefinder</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-28T12:32:11-10:00</updated-at>
      <user-id type="integer">26784</user-id>
      <user-name>dstamat (at elctech)</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I also got the same issue, I digged a bit and found that:

lib/engines/plugin.rb line 88
def add_plugin_view_paths
  view_path = File.join(directory, 'app', 'views')
  if File.exist?(view_path)
    ActionController::Base.view_paths.insert(1, view_path) # push it just underneath the app
    ActionView::TemplateFinder.process_view_paths(view_path)
   end
end

Perhaps we can use ActionController::Base.append_view_path(view_path) instead of ActionController::Base.view_paths.insert(1, view_path).

Anyhow, I got 
/home/aa/apps/adva/vendor/rails/actionpack/lib/action_view/paths.rb:102:in `initialize': wrong number of arguments (2 for 3) (ArgumentError)

when calling ActionController::Base.append_view_path(view_path)

Any tips what method is use instead TemplateFinder.process_view_paths ?

Cheers,
Priit</body>
      <body-html>&lt;div&gt;&lt;p&gt;I also got the same issue, I digged a bit and found that:&lt;/p&gt;
&lt;p&gt;lib/engines/plugin.rb line 88 def add_plugin_view_paths
view_path = File.join(directory, 'app', 'views') if
File.exist?(view_path)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;ActionController::Base.view_paths.insert(1, view_path) # push it just underneath the app
ActionView::TemplateFinder.process_view_paths(view_path)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;end end&lt;/p&gt;
&lt;p&gt;Perhaps we can use
ActionController::Base.append_view_path(view_path) instead of
ActionController::Base.view_paths.insert(1, view_path).&lt;/p&gt;
&lt;p&gt;Anyhow, I got
/home/aa/apps/adva/vendor/rails/actionpack/lib/action_view/paths.rb:102:in
&lt;code&gt;initialize': wrong number of arguments (2 for 3)
(ArgumentError)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;when calling
ActionController::Base.append_view_path(view_path)&lt;/p&gt;
&lt;p&gt;Any tips what method is use instead
TemplateFinder.process_view_paths ?&lt;/p&gt;
&lt;p&gt;Cheers, Priit&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-29T12:08:54-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>new</state>
      <tag>2.2rc1 actionview::templatefinder</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-29T12:08:56-10:00</updated-at>
      <user-id type="integer">32675</user-id>
      <user-name>Priit Tamboom</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sorry about messed up formating in the last post.

In the morning I figured out, that my wrong number of arguments comes from safemode plugin what overides ActionView::Template initialization.

Anyhow, ActionView::Base.append_view_path should be more clean way of adding new view paths.

Cheers</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sorry about messed up formating in the last post.&lt;/p&gt;
&lt;p&gt;In the morning I figured out, that my wrong number of arguments
comes from safemode plugin what overides ActionView::Template
initialization.&lt;/p&gt;
&lt;p&gt;Anyhow, ActionView::Base.append_view_path should be more clean
way of adding new view paths.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-29T23:50:29-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>new</state>
      <tag>2.2rc1 actionview::templatefinder</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-29T23:50:29-10:00</updated-at>
      <user-id type="integer">32675</user-id>
      <user-name>Priit Tamboom</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">137</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The issue with `append_view_paths` is that it adds the path to the env of the `VIEW_PATH`, whereas we actually want to push each plugin's view paths to the top of the stack, but just below the application views (so pushing them into position 1, rather than position 0).

So, I'm not sure if it's possible to use `append_view_path` without radically changing either the precidence order of plugins, or the way that plugins are loaded.

Does that make sense? Any ideas?</body>
      <body-html>&lt;div&gt;&lt;p&gt;The issue with &lt;code&gt;append_view_paths&lt;/code&gt; is that it adds
the path to the env of the &lt;code&gt;VIEW_PATH&lt;/code&gt;, whereas we
actually want to push each plugin's view paths to the top of the
stack, but just below the application views (so pushing them into
position 1, rather than position 0).&lt;/p&gt;
&lt;p&gt;So, I'm not sure if it's possible to use
&lt;code&gt;append_view_path&lt;/code&gt; without radically changing either the
precidence order of plugins, or the way that plugins are
loaded.&lt;/p&gt;
&lt;p&gt;Does that make sense? Any ideas?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-30T04:23:34-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 2.2rc1 actionview::templatefinder
:state: new
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>open</state>
      <tag>2.2rc1 actionview::templatefinder template view</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-30T04:58:56-10:00</updated-at>
      <user-id type="integer">137</user-id>
      <user-name>James Adam</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name>James Adam</assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">137</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks for reply, now i got it.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for reply, now i got it.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-30T05:33:52-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>open</state>
      <tag>2.2rc1 actionview::templatefinder template view</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-30T05:33:57-10:00</updated-at>
      <user-id type="integer">32675</user-id>
      <user-name>Priit Tamboom</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name>James Adam</assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">137</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Isn't this simply a case of changing:

ActionView::TemplateFinder.process_view_paths(view_path)

to:

ActionView::Base.process_view_paths(view_path)

I've got a coupe of apps running successfully on 2.2 with the above change.

There's also another change required in action_mailer.rb:

renderer.finder.view_paths.unshift(*ActionController::Base.view_paths.dup)

becomes

renderer.view_paths.unshift(*ActionController::Base.view_paths.dup)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Isn't this simply a case of changing:&lt;/p&gt;
&lt;p&gt;ActionView::TemplateFinder.process_view_paths(view_path)&lt;/p&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p&gt;ActionView::Base.process_view_paths(view_path)&lt;/p&gt;
&lt;p&gt;I've got a coupe of apps running successfully on 2.2 with the
above change.&lt;/p&gt;
&lt;p&gt;There's also another change required in action_mailer.rb:&lt;/p&gt;
&lt;p&gt;
renderer.finder.view_paths.unshift(*ActionController::Base.view_paths.dup)&lt;/p&gt;
&lt;p&gt;becomes&lt;/p&gt;
&lt;p&gt;
renderer.view_paths.unshift(*ActionController::Base.view_paths.dup)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-30T06:55:58-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>open</state>
      <tag>2.2rc1 actionview::templatefinder template view</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-10-30T06:56:00-10:00</updated-at>
      <user-id type="integer">1741</user-id>
      <user-name>Tekin</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name>James Adam</assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">137</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This was fixed in the 'edge' branch a while back - apologies for not updating this ticket (http://github.com/lazyatom/engines/commit/499ce3b0480d8fa9375203f5efcadb8cf6ea9efe#comments)</body>
      <body-html>&lt;div&gt;&lt;p&gt;This was fixed in the 'edge' branch a while back - apologies for
not updating this ticket (&lt;a href=&quot;http://github.com/lazyatom/engines/commit/499ce3b0480d8fa9375203f5efcadb8cf6ea9efe#comments&quot;&gt;http://github.com/lazyatom/engin...&lt;/a&gt;)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-09T06:14:00-10:00</created-at>
      <creator-id type="integer">26784</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">39</number>
      <permalink>rails-22rc1-actionviewtemplatefinder</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">10178</project-id>
      <state>resolved</state>
      <tag>2.2rc1 actionview::templatefinder template view</tag>
      <title>Rails 2.2rc1 - ActionView::TemplateFinder</title>
      <updated-at type="datetime">2008-11-09T06:14:01-10:00</updated-at>
      <user-id type="integer">137</user-id>
      <user-name>James Adam</user-name>
      <creator-name>dstamat (at elctech)</creator-name>
      <assigned-user-name>James Adam</assigned-user-name>
      <url>http://engines.lighthouseapp.com/projects/10178/tickets/39</url>
    </version>
  </versions>
</ticket>
