I am a little confused by the includes I suspect. In the book, it states
that runtime environment will load the directories app, app/models,
app/controllers, app/helpers, app/apis, components, config, lib, vendor
However, when I try to access my “current_project” public method, it
with a NoMethodError.
What is even stranger is that I can use reflection to find that the
is indeed there. For instance, this code:
ApplicationHelper.public_instance_methods.each do |method|
if method == “current_project”
puts "calling " + method
Will find the method but then when it is called, it will still complain
Loaded suite test/functional/account_controller_test
Finished in 0.172 seconds.
NoMethodError: undefined method
current_project' for ApplicationHelper:Module test/functional/account_controller_test.rb:31:insend’
3 tests, 4 assertions, 0 failures, 1 errors
So I am really confused how it can know the module is there, be able to
the method in question and then claim to not know the method at all. If
anyone knows the trick to getting the helpers to be called from the
that would be really appreciated.