Sha256: b2591555319828d77c73ec5ed19be84720b8aa7ef3408bdc219e9e5159b5094a

Contents?: true

Size: 731 Bytes

Versions: 59

Compression:

Stored size: 731 Bytes

Contents

module ActiveAdmin
  module AssetRegistration

    # Stylesheets

    def register_stylesheet(*args)
      stylesheets << ActiveAdmin::Stylesheet.new(*args)
    end

    def stylesheets
      @stylesheets ||= []
    end

    def clear_stylesheets!
      @stylesheets = []
    end


    # Javascripts

    def register_javascript(name)
      javascripts << name
    end

    def javascripts
      @javascripts ||= []
    end

    def clear_javascripts!
      @javascripts = []
    end

  end
  
  # Wrapper class for stylesheet registration
  class Stylesheet
    
    attr_reader :options, :path
    
    def initialize(*args)
      @options = args.extract_options!
      @path = args.first if args.first
    end
    
  end
  
end

Version data entries

59 entries across 59 versions & 3 rubygems

Version Path
lalala-4.0.0.dev.59 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.58 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.57 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.56 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.50 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.46 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
activeadmin-0.5.1 lib/active_admin/asset_registration.rb
activeadmin-0.5.0 lib/active_admin/asset_registration.rb
activeadmin-0.5.0.pre1 lib/active_admin/asset_registration.rb
activeadmin-0.5.0.pre lib/active_admin/asset_registration.rb
activeadmin-0.4.4 lib/active_admin/asset_registration.rb
activeadmin-0.4.3 lib/active_admin/asset_registration.rb
activeadmin-0.4.2 lib/active_admin/asset_registration.rb
activeadmin-0.4.1 lib/active_admin/asset_registration.rb
activeadmin-0.4.0 lib/active_admin/asset_registration.rb
andrewroth_activeadmin-0.3.4.4 lib/active_admin/asset_registration.rb
andrewroth_activeadmin-0.3.4.3 lib/active_admin/asset_registration.rb
andrewroth_activeadmin-0.3.4.2 lib/active_admin/asset_registration.rb
andrewroth_activeadmin-0.3.4.1 lib/active_admin/asset_registration.rb