Peter Bex wrote:
> On Mon, Sep 17, 2007 at 05:48:08AM +0200, Subimage Interactive wrote: 
> require_dependency RAILS_ROOT + "vendor/plugin/my_plugin/app/models/foo"
> 
> class Foo < ActiveRecord::Base
>   # extend here
> end


Many thanks...syntax was a bit off, but easily corrected.


require_dependency RAILS_ROOT + 
"/vendor/plugins/substruct/app/models/order"

class Order < ActiveRecord::Base
  def promotion_code
    if self.promotion
      return self.promotion.code
    else
      return "W001"
    end
  end

end



-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Engine-Users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to