Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

[#5] Add #nested_form method#7

Merged
lluzak merged 1 commit intolluzak:masterfrom
LTe:nested-form
Mar 28, 2014
Merged

[#5] Add #nested_form method#7
lluzak merged 1 commit intolluzak:masterfrom
LTe:nested-form

Conversation

@LTe
Copy link
Copy Markdown
Collaborator

@LTe LTe commented Mar 28, 2014

From now user can use #nested_method on from classes. This works exactly
like old #nested_forms but there is no need to declarate two times
attribues.

I also removed copy error feature. Now we are using #validates_associated
method from ActiveRecord (with little changes).

Example of usage:

class UserForm < FormObjects::Base
   nested_form :addresses, Array[AddressForm]
   nested_form :personal_info, PersonalInfoForm
end

From now user can use #nested_method on from classes. This works exactly
like old #nested_forms but there is no need to declarate two times
attribues.

I also removed copy error feature. Now we are using #validates_associated
method from ActiveRecord (with little changes).

Example of usage:

class UserForm < FormObjects::Base
   nested_form :addresses, Array[AddressForm]
   nested_form :personal_info, PersonalInfoForm
end

Fixes lluzak#5
Fixes lluzak#6
lluzak added a commit that referenced this pull request Mar 28, 2014
[#5] Add #nested_form method
@lluzak lluzak merged commit 1d4ecad into lluzak:master Mar 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants