Module: AbAdmin::Concerns::AdminAddition::ClassMethods

Defined in:
lib/ab_admin/concerns/admin_addition.rb

Instance Method Summary collapse

Instance Method Details

#for_input_token(r, attr = nil) ⇒ Object


16
17
18
19
# File 'lib/ab_admin/concerns/admin_addition.rb', line 16

def for_input_token(r, attr=nil)
  text = attr ? r[attr] : (r['name_ru'] || r['name'])
  {id: r.id, text: text}
end