Sha256: 2cbd7c0f6420cac7394bedaa35538326cee7a15656ae881e2f4f7dd0e615b070

Contents?: true

Size: 1.92 KB

Versions: 28

Compression:

Stored size: 1.92 KB

Contents

module Merb
  module MerbAdmin
    module ApplicationHelper

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path relative to the public directory, with added segments.
      def image_path(*segments)
        public_path_for(:image, *segments)
      end

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path relative to the public directory, with added segments.
      def javascript_path(*segments)
        public_path_for(:javascript, *segments)
      end

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path relative to the public directory, with added segments.
      def stylesheet_path(*segments)
        public_path_for(:stylesheet, *segments)
      end

      # Construct a path relative to the public directory
      #
      # @param <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path relative to the public directory, with added segments.
      def public_path_for(type, *segments)
        ::MerbAdmin.public_path_for(type, *segments)
      end

      # Construct an app-level path.
      #
      # @param <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path within the host application, with added segments.
      def app_path_for(type, *segments)
        ::MerbAdmin.app_path_for(type, *segments)
      end

      # Construct a slice-level path.
      #
      # @param <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String>
      #  A path within the slice source (Gem), with added segments.
      def slice_path_for(type, *segments)
        ::MerbAdmin.slice_path_for(type, *segments)
      end

    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
merb-admin-0.8.8 app/helpers/application_helper.rb
merb-admin-0.8.7 app/helpers/application_helper.rb
merb-admin-0.8.6 app/helpers/application_helper.rb
merb-admin-0.8.1 app/helpers/application_helper.rb
merb-admin-0.8.0 app/helpers/application_helper.rb
merb-admin-0.7.6 app/helpers/application_helper.rb
merb-admin-0.7.5 app/helpers/application_helper.rb
merb-admin-0.7.4 app/helpers/application_helper.rb
merb-admin-0.7.3 app/helpers/application_helper.rb
merb-admin-0.7.2 app/helpers/application_helper.rb
merb-admin-0.7.1 app/helpers/application_helper.rb
merb-admin-0.7.0 app/helpers/application_helper.rb
merb-admin-0.6.9 app/helpers/application_helper.rb
merb-admin-0.6.8 app/helpers/application_helper.rb
merb-admin-0.6.7 app/helpers/application_helper.rb
merb-admin-0.6.6 app/helpers/application_helper.rb
merb-admin-0.6.5 app/helpers/application_helper.rb
merb-admin-0.6.4 app/helpers/application_helper.rb
merb-admin-0.6.3 app/helpers/application_helper.rb
merb-admin-0.6.2 app/helpers/application_helper.rb