app/helpers/application_helper.rb
# find a corresponding field_type from its name
find a corresponding field_type from its name
find a corresponding field_type from its name
def filter(field_name)
    if Filter.where(field_name: field_name).exists?
      Filter.find_by(field_name: field_name)
    else
      nil
    end
  end
def filter ( field_name ) if Filter . where ( field_name : field_name ) . exists? Filter . find_by ( field_name : field_name ) else nil end end
find a corresponding field_type from its name
find a corresponding field_type from its name
field_name