8000 [887] Respect the form buffer! by seanlinsley · Pull Request #1996 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

[887] Respect the form buffer! #1996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2013
Merged

[887] Respect the form buffer! #1996

merged 2 commits into from
Mar 19, 2013

Conversation

seanlinsley
Copy link
Contributor

resolves #887

All it took:

# This method calls the block it's passed (in our case, the `f.inputs` block)
# and wraps the resulting HTML in a fieldset. If your block happens to return
# nil (but it otherwise built the form correctly), the below override passes
# the most recent part of the Active Admin form buffer.
def field_set_and_list_wrapping(*args, &block)
  block_given? ? super{ yield || form_buffers.last } : super
end

@seanlinsley
Copy link
Contributor Author

/cc @macfanatic

seanlinsley added a commit that referenced this pull request Mar 19, 2013
@seanlinsley seanlinsley merged commit ece76d8 into activeadmin:master Mar 19, 2013
seanlinsley added a commit that referenced this pull request Mar 25, 2013
fixes `semantic_errors` regression from #1996 as per
my discussion with @coreyward in the diff for a1cfdb6
@seanlinsley seanlinsley deleted the bugfix/887-form-buffers branch April 16, 2013 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Showing fields just on "create" or "edit forms"
2 participants
0