Sha256: 7da12690b465ef5dabbf05463fdc18e5f1c5f482faf3ca2eb2f2de735b3a44cd

Contents?: true

Size: 270 Bytes

Versions: 40

Compression:

Stored size: 270 Bytes

Contents

module ActiveAdmin
  module ViewHelpers
    module ScopeNameHelper

      def scope_name(scope)
        case scope.name
        when Proc then
          self.instance_exec(&scope.name).to_s
        else
          scope.name.to_s
        end
      end

    end
  end
end

Version data entries

40 entries across 40 versions & 5 rubygems

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