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.141 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/lib/active_admin/asset_registration.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/lib/active_admin/asset_registration.rb