Module: XmlActive

Included in:
ActiveRecord::Base
Defined in:
lib/xml_active.rb,
lib/xml_active/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VALID_FROM_XML_OPTIONS =
[:sync, :create, :update, :destroy, :fail_on_invalid]
VERSION =
"0.0.6"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/xml_active.rb', line 4

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#ensure_unique(name) ⇒ Object



8
9
10
11
12
# File 'lib/xml_active.rb', line 8

def ensure_unique(name)
  begin
    self[name] = yield
  end while self.class.exists?(name => self[name])
end