Sha256: 7bdce40a2a15dfc80ff284d926383ecbe557cb8f39b5c6c7b32098a5c6de0764

Contents?: true

Size: 409 Bytes

Versions: 9

Compression:

Stored size: 409 Bytes

Contents

module ViewModels
  module Helpers
    # Module for conveniently including common view_helpers into a view_model
    #
    module View
      
      # Include hook.
      #
      def self.included view_model
        view_model.send :include, *all_view_helpers
      end
      
      def self.all_view_helpers
        [
          ActionView::Helpers,
          ERB::Util
        ]
      end
  
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
view_models-2.0.1 lib/rails2/lib/helpers/view.rb
view_models-2.0.0.ruby19 lib/rails2/lib/helpers/view.rb
view_models-2.0.0 lib/rails2/lib/helpers/view.rb
view_models-1.5.7 lib/helpers/view.rb
view_models-1.5.6 lib/helpers/view.rb
view_models-1.5.5 lib/helpers/view.rb
view_models-1.5.4 lib/helpers/view.rb
view_models-1.5.3 lib/helpers/view.rb
view_models-1.5.2 lib/helpers/view.rb