Skip to content

hide 'any' select option from Select Input type filter #1533

Description

@kapsdewade

I want to hide or remove 'any' from select option based on user role... is there any way to do that?
this is what i tried

filter :product_type, :as=>:select, :include_blank =>false, :collection => ['a','b','c'] ...but no effect

in case...
following is the code for hiding 'any' from all select option in activeadmin

module ActiveAdmin
module Inputs
class FilterSelectInput < ::Formtastic::Inputs::SelectInput
def input_options
super.merge(:include_blank => false)
end
end
end
end

put this code in initializer/active_admin.rb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions