Module: Para::ModelFieldParsers

Defined in:
lib/para/model_field_parsers.rb,
lib/para/model_field_parsers/base.rb,
lib/para/model_field_parsers/enums.rb,
lib/para/model_field_parsers/store.rb,
lib/para/model_field_parsers/devise.rb,
lib/para/model_field_parsers/globalize.rb,
lib/para/model_field_parsers/orderable.rb,
lib/para/model_field_parsers/paperclip.rb,
lib/para/model_field_parsers/relations.rb,
lib/para/model_field_parsers/friendly_id.rb,
lib/para/model_field_parsers/closure_tree.rb,
lib/para/model_field_parsers/wysiwyg_editor.rb

Defined Under Namespace

Classes: Base, ClosureTree, Devise, Enums, FriendlyId, Globalize, Orderable, Paperclip, Relations, Store, WysiwygEditor

Class Method Summary collapse

Class Method Details

.parse!(model, fields_hash, mappings) ⇒ Object



7
8
9
10
11
12
# File 'lib/para/model_field_parsers.rb', line 7

def self.parse!(model, fields_hash, mappings)
  registered_parsers.each do |_, parser_class|
    parser = parser_class.new(model, fields_hash, mappings)
    parser.parse! if parser.applicable?
  end
end

.registered_parsersObject



3
4
5
# File 'lib/para/model_field_parsers.rb', line 3

def self.registered_parsers
  @registered_parsers ||= {}
end