Hey all,

It seems that Engines trunk doesn't like to play nice with the Exception Notifier plugin.  Since installing Engines, I've been getting the following exception when the Exception Notifier tries to email me:

ActionView::ActionViewError (Couldn't find template file for exception_notifier/exception_notification in ["/home/bonanzle/releases/20080211100505/app/views", "/home/bonanzle/releases/20080211100505/vendor/plugins/savage_beast/app/views"]):
    /vendor/rails/actionpack/lib/action_view/base.rb:312:in `render_file'
    /vendor/rails/actionpack/lib/action_view/base.rb:348:in `render'
    /vendor/rails/actionmailer/lib/action_mailer/base.rb:502:in `render'
& nbsp;   /vendor/rails/actionmailer/lib/action_mailer/base.rb:494:in `render_message'
    /vendor/rails/actionmailer/lib/action_mailer/base.rb:442:in `create!'
    /vendor/rails/actionmailer/lib/action_mailer/base.rb:403:in `initialize'
    /vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb:26:in `new'
    /vendor/rails/actionmailer/lib/action_mailer/base.rb:352:in `method_missing'
    /vendor/plugins/exception_notification/lib/exception_notifiable.rb:95:in `rescue_action_in_public'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:125:in `rescue_action'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:203:in `perform_action_without_caching'
     /vendor/rails/actionpack/lib/acti on_controller/caching.rb:678:in `perform_action'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
    /vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
    /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
    /vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
    /vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in&nb sp;`handle_request'
   ...

and

Rendering /home/bonanzle/releases/20080211100505/public/500.html (500 Error)
/!\ FAILSAFE /!\  Mon Feb 11 10:24:36 UTC 2008
  Status: 500 Internal Server Error
  Couldn't find template file for exception_notifier/exception_notification in ["/home/bonanzle/releases/20080211100505/app/views", "/home/bonanzle/releases/20080211100505/vendor/plugins/savage_beast/app/views"]
    /home/bonanzle/releases/20080211100505/vendor/rails/actionpack/lib/action_view/base.rb:312:in `render_file'
    /home/bonanzle/releases/20080211100505/vendor/rails/actionpack/lib/action_view/base.rb:348:in `render'
    /home/bonanzle/releases/20080211100505/vendor/rails/actionmailer/lib/action_mailer/base.rb:502:in  `render'
   ...

Has anyone else successfully used the Engines trunk with Exception Notifier?

Thanks,
Bill





------- Original Message Follows -------
To: 
Subject: Rails 2.0 Engines Plugin: belongs_to Methods Not Working
Date: Tue, 29 Jan 2008 20:06:03

Hey all,

I'm not positive if this is a Engines bug, but it seems very peculiar and a few hours of Googling haven't given me any good leads yet, so I thought I'd see if it makes sense to any of you:

I am writing a new version of the savage_beast plugin (implements Beast forums as a plugin) that's Rails 2.0 compatible, and I am having trouble with the many models in the plugin that refer to the User model (which lives in my project).  For example, my Post class (part of the savage_beast plugin) has

class Post < ActiveRecord::Base
  belongs_to :forum
  belongs_to :user
  belongs_to :topic

   ...
end

I can set the forum, user, and topic for this class fine, and they save without issue.  However, when I go to access the user association later on, I can only get its database fields, not any of the methods that are defined in the User model.  That is,

@post.user[:some_database_attribute] will display fine
@post.user.any_method_at_all will give me a "No method found" error. 

If I check what kind of class @post.user is, Ruby will report it is a "User" class as usual.  I have tried to hack around this by doing a def user { User.find(user_id) } in the plugin, but users are used as associations in numerous instances in numerous models, sometimes as has_many_throughs, so besides being ugly, I don't think this hack is going to be viable across the board (though doing a User.find of the user_id does return a model with methods intact).

Do any of you have any suggestions about how I could fix (or start to debug) this issue?

Thanks,
Bill Harding



_______________________________________________
Engine-Users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to