Sha256: 7ba38179ca66cab9e0ebd127c222c92e19b1dba52e5fc2b8bd4176f12a5aa796
Contents?: true
Size: 429 Bytes
Versions: 12
Compression:
Stored size: 429 Bytes
Contents
class GroupForm < Kadmin::Form delegate_attributes :name, owner_id: [:reader] delegate_association :owner, to: 'PersonForm' def initialize(*args) super raise(ArgumentError, 'Model given should be a group') unless @model.nil? || @model.is_a?(Group) end def owner_id=(id) @model.owner_id = id.to_i end def owner_attributes=(attributes) form = owner form.assign_attributes(attributes) end end
Version data entries
12 entries across 12 versions & 1 rubygems