Class: Canto
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Canto
- Extended by:
- Language
- Defined in:
- app/models/canto.rb
Constant Summary
Constants included from Language
Language::LANGUAGE_TREE, Language::OPTIONS
Instance Method Summary collapse
Methods included from Language
alphabeth_list, alphabeth_list_for, has_alphabeth, language_list, language_list_for
Instance Method Details
#targets=(value) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/models/canto.rb', line 14 def targets= value if value.kind_of?( Array ) new_value = value.map do |v| if v.kind_of?(String) && v =~ /^\^(.*)/ Memory.where(short_name: $1).first else v ;end;end .compact super(new_value) else super ;end;end |