Hi,
I have a share code module in lib/tmsr/addons/tsr_helpers.rb
, required in config/environment.rb
and included in apps/myapp/application.rb
as follows:
controller.prepare do
include Hanami::TsrHelpers
# include MyAuthentication # included in all the actions
# before :authenticate! # run an authentication before callback
end
# Configure the code that will yield each time Monocular::View is included
# This is useful for sharing common functionality
#
# See: http://www.rubydoc.info/gems/hanami-view#Configuration
view.prepare do
include Hanami::TsrHelpers
end
This is working for the controller, but when I try to use it in a view I get this error: undefined local variable or method
get_current_decimal_separator’ for Myapp::Views::Qareports::Show:Class`.
Why is it blowing up?