Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application#dependencies ignore the appended path. #1669

Closed
tmtm opened this issue May 1, 2014 · 1 comment
Closed

Application#dependencies ignore the appended path. #1669

tmtm opened this issue May 1, 2014 · 1 comment

Comments

@tmtm
Copy link
Contributor

tmtm commented May 1, 2014

The comment of Application#dependencies describe:

Appends custom dependency patterns to the be loaded for your Application.
MyApp.dependencies << "#{Padrino.root}/uploaders/**/*.rb"
MyApp.dependencies << Padrino.root('other_app', 'controllers.rb')

but it does not work because #dependencies returns dynamically generated array object.

@dariocravero
Copy link

Hi @tmtm,

You should be using something along the lines of this:

# config/boot.rb
Padrino.before_load do
  Padrino.dependency_paths << Padrino.root('uploaders/**/*.rb')
  Padrino.dependency_paths << Padrino.root('other_app', 'controllers.rb')
end

http://www.padrinorb.com/guides/development-commands#auto-load-paths

Sorry for the confusion, we will clean up the docs soon. Reopen the issue if it's still there.

@DAddYE @padrino/core-members I think we should revise the usage of prerequisites itself, it has been confusing for people for a while. Ref. #556 #731

Darío

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants