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-rails-1.7.1 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-rails-1.7.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-rb-1.6.0 lib/active_admin/view_helpers/scope_name_helper.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/view_helpers/scope_name_helper.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-rb-1.5.2 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.9.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.8.1 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.8.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-rb-1.5.1 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.7.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.6.1 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.6.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.5.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.4.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.3.1 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.3.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.2.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.1.0 lib/active_admin/view_helpers/scope_name_helper.rb
activeadmin-2.0.0 lib/active_admin/view_helpers/scope_name_helper.rb