Sha256: 75bf65dc809615f6886871f150f4c300889daf88d75675eaaa2b9afe9f01f877

Contents?: true

Size: 789 Bytes

Versions: 36

Compression:

Stored size: 789 Bytes

Contents

module <%= module_name %>
  
  # All Slice code is expected to be namespaced inside this module.
  
  class Application < Merb::Controller
    
    controller_for_slice
    
    private
    
    # Construct a path relative to the public directory
    def public_path_for(type, *segments)
      ::<%= module_name %>.public_path_for(type, *segments)
    end
    
    # Construct an app-level path.
    def app_path_for(type, *segments)
      ::<%= module_name %>.app_path_for(type, *segments)
    end
    
    # Construct a slice-level path
    def slice_path_for(type, *segments)
      ::<%= module_name %>.slice_path_for(type, *segments)
    end
    
  end
  
  class Main < Application
    
    def index
      render "#{slice.description} (v. #{slice.version})"
    end
    
  end
  
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
merb-slices-1.1.3 lib/generators/templates/common/application.rb
merb-slices-1.1.2 lib/generators/templates/common/application.rb
merb-slices-1.1.1 lib/generators/templates/common/application.rb
merb-slices-1.1.0 lib/generators/templates/common/application.rb
merb-slices-1.1.0.rc1 lib/generators/templates/common/application.rb
merb-slices-1.1.0.pre lib/generators/templates/common/application.rb
merb-slices-1.0.15 lib/generators/templates/common/application.rb
merb-slices-1.0.14 lib/generators/templates/common/application.rb
merb-slices-1.0.13 lib/generators/templates/common/application.rb
merb-slices-1.0.12 lib/generators/templates/common/application.rb
merb-slices-0.9.4 lib/generators/templates/very_thin/application.rb
merb-slices-0.9.5 lib/generators/templates/common/application.rb
merb-slices-0.9.8 lib/generators/templates/common/application.rb
merb-slices-1.0.1 lib/generators/templates/common/application.rb
merb-slices-1.0.11 lib/generators/templates/common/application.rb
merb-slices-0.9.10 lib/generators/templates/common/application.rb
merb-slices-0.9.13 lib/generators/templates/common/application.rb
merb-slices-0.9.6 lib/generators/templates/common/application.rb
merb-slices-0.9.7 lib/generators/templates/common/application.rb
merb-slices-0.9.9 lib/generators/templates/common/application.rb