In a application I am working on I have added forms path to app path
where I keep my app specific forms. My application searches if file is
present inside my app/forms folder or any other forms folder which can
be added later. In order this to work I have added:
config.paths["forms"] = Rails.root.join('app/forms') to application.rb

I am in the process of transforming part of application to engine.
According to what I have found yet this should work:

my_app/lib/my_app/engine.rb

module MyApp
  class Engine < ::Rails::Engine
    paths["forms"] = File.expand_path("../../../app/forms", __FILE__)
    p paths
  end
end

p paths actually shows that path["forms"] is added to paths, but after
that in my application if I do:
p Rails.configuration.paths

doesn't include it.

What am I doing wrong?

by
TheR

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to