Thanks for that Ben,

The reason I hadn't picked up on this was because of some changes in
ActionMailer (namely picking up method_name.text.whatever.rhtml
templates). The way ActionMailer::Base has been put together, it's
quite tricky to untangle it into a state where we can start to make it
play nice with plugins. The fixes suggested on that ticket work with
*implicit* multipart mails, but not with explict ones (where parts are
defined via part "text/plain" { ... } ), or so it seems.

I'll have a think, but if anyone comes up with a general fix (plus
tests), please do throw them up against this ticket.

James

On 1/28/07, ben wiseley <[EMAIL PROTECTED]> wrote:
> James,
>
> Updated the ticket that mentions this with a zip file that can be used to
> test this.  Sorry - kind of new to the patch thing with open source projects
> and am not sure what exactly people are supposed to do :).  Tried to check
> in to your project but it wouldn't let me so I sent a zip file instead.
> README.txt has details on how to get the unit test to pass.  There's also
> some basic UI stuff included for mucking about from the browser if it helps.
>
> http://dev.rails-engines.org/tickets/263
>
> Thanks for all your work on Engines... this has made my work much easier and
> DRYer.
>
> -ben
>
>
>
> On 1/28/07, James Adam < [EMAIL PROTECTED]> wrote:
> > Hi Ben,
> >
> > There's currently a ticket for this on the issue tracker
> >
> (http://dev.rails-engines.org/engines-plugin/tickets/263),
> but since I
> > don't use ActionMailer day-to-day, it's not trivial for me to
> > replicate this error. Could you add a failing test case to the test
> > application
> (http://svn.rails-engines.org/test/engines/rails_1.2) and
> > submit it as a patch to that ticket?
> >
> > Failing that, a zip of the failing mailer model, mail views and so on
> > would also be useful.
> >
> > Thanks - this seems to be the only blocker before I release 1.2 :)
> >
> > On 1/28/07, ben wiseley < [EMAIL PROTECTED]> wrote:
> > > James,
> > >
> > > Seems to be working pretty well on both of our fairly large apps that
> > > are using engines.
> > >
> > > The only problem I've run into so far is with  mailers...
> > >
> > > In engines/lib/engines/rails_extransion/templates.rb in
> method
> > > render_with_engine_additions(opts) at line 133 I had to
> make this
> > > small change
> > >
> > >         template_path_for_method =
> > > Dir["#{template_path}/#{opts[:file]}.*"].first ||
> > > Dir["#{template_path}/#{opts[:file]}"].first
> > >
> > > My Input data (if it helps) was:
> > >
> > > For opts.to_yaml:
> > >
> > > :body:
> > >   notification_type: new_comment
> > >   blog_entry_title: asdf
> > >   comment_by_html: " by <a href='http://activerain.com/wiseleyb' >Ben
> > > Wiseley</a>"
> > >   comment: asdf<br />
> > >   blog_entry_url:
> http://localhost:3000/blogsview/33218/asdf
> > >   comment_by_text: " by Ben Wiseley"
> > > :file: blog_notification_email.text.html.rhtml
> > >
> > > And for template_path.to_yaml:
> > >
> > > ---
> "{/Users/wiseleyb/dev/activerain/activeagent/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/active_engine/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/acts_as_ferret/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/exception_notification/app/views/emailer,/Users/wiseleyb/dev/activerain/activeagent/vendor/plugins/engines/app/views/emailer}"
> > >
> > >
> > >
> > > On 1/28/07, James Adam <[EMAIL PROTECTED]> wrote:
> > > > Hi Ben,
> > > >
> > > > The main release of the engines plugin hasn't yet been updated to work
> > > > with Rails 1.2. Instead, could you use SVN to check out the 1.2
> > > > release branch?
> > > >
> > > >   svn co
> http://svn.rails-engines.org/engines/branches/rb_1.2
> > > > vendor/plugins/engines
> > > >
> > > > That should work, but if you do experience any problems please post
> > > > back to list list, or onto the issue tracker (see the docs)
> > > >
> > > > Thanks
> > > >
> > > > James
> > > >
> > > > On 1/28/07, ben wiseley <[EMAIL PROTECTED]> wrote:
> > > > > Any ideas on this?  On a "from scratch, do nothing app" I'm getting
> > > > > this error when mixing engines plugin and the exception_notification
> > > > > plugin...
> > > > >
> > > > > Engines by themselves work and exception_notification by itself
> works
> > > > > but I can't seem to combine the two
> > > > >
> > > > > I read through the news site on engines and didn't see this
> covered...
> > > > > anyone have any ideas.
> > > > >
> > > > > *  Upgraded to Rails 1.2.1 (and updated all gems)
> > > > >
> > > > > *  Did a Rails rails12test
> > > > >
> > > > > *  script/plugin install
> > > > >
> http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/
> > > > >
> > > > > *  set that up like you normally do (enviroment/application
> settings)
> > > > >
> > > > > * put up a dummy controller... app runs fine
> > > > >
> > > > > * ruby script/plugin install
> http://svn.rails-engines.org/plugins/engines
> > > > >
> > > > > * added the line to environment:
> > > > >     config.plugins = %W( engines exception_notification )
> > > > >
> > > > > * run app and I get a:
> > > > >
> > > > > ben-wiseleys-computer:~/dev/rail12test wiseleyb$
> mongrel_rails start
> > > > > ** Starting Mongrel listening at 0.0.0.0:3000
> > > > > ** Starting Rails with development environment...
> > > > > /opt/local/lib/ruby/gems/1.8/gems/activesupport-
> 1.4.0/lib/active_support/dependencies.rb:250:in
> > > > > `load_missing_constant': Expected
> > > > >
> /Users/wiseleyb/dev/rail12test/config/../vendor/plugins/exception_notification/lib/exception_notifier.rb
> > > > > to define ExceptionNotifier (LoadError)
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in
> > > > > `const_missing'
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:465:in
> > > > > `const_missing'
> > > > >         from
> /Users/wiseleyb/dev/rail12test/config/environment.rb:61
> > > > >         from
> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in
> > > > > `gem_original_require'
> > > > >         from
> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in
> > > > > `require'
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:155:in
> > > > > `rails'
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-
> 1.0.1/bin/mongrel_rails:112:in
> > > > > `cloaker_'
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in
> > > > > `call'
> > > > >          ... 6 levels...
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in
> > > > > `run'
> > > > >         from
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
> > > > >         from /opt/local/bin/mongrel_rails:18:in
> `load'
> > > > >         from /opt/local/bin/mongrel_rails:18
> > > > > _______________________________________________
> > > > > engine-developers mailing list
> > > > > [email protected]
> > > > >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> > > > >
> > > >
> > > >
> > > > --
> > > > * J *
> > > >   ~
> > > > _______________________________________________
> > > > engine-developers mailing list
> > > > [email protected]
> > > >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> > > >
> > > _______________________________________________
> > > engine-developers mailing list
> > > [email protected]
> > >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> > >
> >
> >
> > --
> > * J *
> >   ~
> > _______________________________________________
> > engine-developers mailing list
> > [email protected]
> >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> >
>
>
> _______________________________________________
> engine-developers mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
>
>
>


-- 
* J *
  ~
_______________________________________________
engine-developers mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org

Reply via email to