Sha256: 22d44351567a57a15469bee7c7d0e6a9e18aedd10604fd635f74de73f03ac358

Contents?: true

Size: 857 Bytes

Versions: 17

Compression:

Stored size: 857 Bytes

Contents

module ActiveAdmin
  module AssetRegistration

    def register_stylesheet(path, options = {})
      Deprecation.warn <<-MSG.strip_heredoc
        The `register_stylesheet` config is deprecated and will be removed
        in v2. Import your "#{path}" stylesheet in the active_admin.scss.
      MSG
      stylesheets[path] = options
    end

    def stylesheets
      @stylesheets ||= {}
    end

    def clear_stylesheets!
      stylesheets.clear
    end

    def register_javascript(name)
      Deprecation.warn <<-MSG.strip_heredoc
        The `register_javascript` config is deprecated and will be removed
        in v2. Import your "#{name}" javascript in the active_admin.js.
      MSG
      javascripts.add name
    end

    def javascripts
      @javascripts ||= Set.new
    end

    def clear_javascripts!
      javascripts.clear
    end

  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin-rb-1.4.0 lib/active_admin/asset_registration.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin-1.4.3 lib/active_admin/asset_registration.rb
activeadmin-1.4.2 lib/active_admin/asset_registration.rb
activeadmin-1.4.1 lib/active_admin/asset_registration.rb
activeadmin-1.4.0 lib/active_admin/asset_registration.rb
activeadmin-1.3.1 lib/active_admin/asset_registration.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin-1.3.0 lib/active_admin/asset_registration.rb
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/asset_registration.rb
activeadmin-1.2.1 lib/active_admin/asset_registration.rb
activeadmin-1.2.0 lib/active_admin/asset_registration.rb
activeadmin-1.1.0 lib/active_admin/asset_registration.rb