Share code for View is not working

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.rbas 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?

puts Monocular::Views::Qareports::Show.ancestors in the affected view gives me this, so the module is included:

#<Module:0x00005629ebed6820>
Myapp::Views::Qareports::Show
Hanami::TsrHelpers
Hanami::Assets::Helpers
Hanami::Helpers::NumberFormattingHelper
Hanami::Helpers::FormHelper
Hanami::Helpers::LinkToHelper
Hanami::Helpers::RoutingHelper
Hanami::Helpers::EscapeHelper
Hanami::Helpers::HtmlHelper
Hanami::Helpers
GetUser
Hanami::View::Escape::InstanceMethods
Hanami::View::Rendering::InstanceMethods
Myapp::View
Hanami::Utils::ClassAttribute
Object
PP::ObjectMixin
RequireAll
JSON::Ext::Generator::GeneratorMethods::Object
Kernel
BasicObject