Sha256: 264829f6cfed027078ce7a5fd9d5b76786035a5862f97edb929c2c8aa7f10272

Contents?: true

Size: 513 Bytes

Versions: 3

Compression:

Stored size: 513 Bytes

Contents

module Padrino
  module ViewModels
    
    class << self
      def registered app
        app.send :include, ::ViewModels::Helpers::Mapping
        
        Padrino.set_load_paths File.join(app.root, "/view_models")
        
        Padrino.require_dependencies File.join(app.root, "/view_models.rb")
        # FIXME Needs to require in a specific order.
        #
        Padrino.require_dependencies File.join(app.root, "/view_models/**/*.rb")
      end
      alias :included :registered
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
view_models-2.0.1 lib/padrino/lib/padrino/view_models.rb
view_models-2.0.0.ruby19 lib/padrino/lib/padrino/view_models.rb
view_models-2.0.0 lib/padrino/lib/padrino/view_models.rb