Module: Repop
- Defined in:
- lib/repop/repop.rb,
lib/repop/version.rb,
lib/repop/repopable.rb,
lib/generators/repop/migration/migration_generator.rb
Defined Under Namespace
Modules: InstanceMethods
Classes: MigrationGenerator, Repop
Constant Summary
collapse
- VERSION =
"0.1.0"
Instance Method Summary
collapse
Instance Method Details
#repop_add(exc = []) ⇒ Object
2
3
4
5
6
7
8
|
# File 'lib/repop/repopable.rb', line 2
def repop_add(exc = [])
has_many :repops, :as=>:repopable, :dependent=>:destroy, :class_name => "Repop::Repop"
accepts_nested_attributes_for :repops, :allow_destroy => true, :reject_if => proc {|o| o['key'].blank? or exc.include?(o['key'])}
attr_accessible :repop_attributes
include InstanceMethods
@@exc = exc
end
|
#repop_local ⇒ Object
9
10
11
|
# File 'lib/repop/repopable.rb', line 9
def repop_local
return @@exc
end
|