Sha256: 5b323424f6bfe4c143ef2ccf7afbfbd4fdad7a54fcf889bc465492c5a93a33d3
Contents?: true
Size: 513 Bytes
Versions: 2
Compression:
Stored size: 513 Bytes
Contents
module Lolita module Configuration class NestedForm @@last_nested_form=0 attr_reader :parent, :options attr_accessor :name def initialize parent,name=nil, options ={} @parent=parent @options = options self.name=name || "nested_form_#{next_nested_form}" end def fields self.parent.fields.reject{|f| f.nested_form!=self} end private def next_nested_form @@last_nested_form+=1 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lolita-3.1.14 | lib/lolita/configuration/nested_form.rb |
lolita-3.1.13 | lib/lolita/configuration/nested_form.rb |