Skip to content

Convert active_admin_form_for to Arbre component - resolves #2542#3486

Merged
timoschilling merged 8 commits into
activeadmin:masterfrom
activeadmin-rails:2542-arbe-buffering-inside-aa-forms
Oct 25, 2014
Merged

Convert active_admin_form_for to Arbre component - resolves #2542#3486
timoschilling merged 8 commits into
activeadmin:masterfrom
activeadmin-rails:2542-arbe-buffering-inside-aa-forms

Conversation

@varyonic

Copy link
Copy Markdown
Contributor

Resolves #2542. Uses FormBuilderProxy as suggested by Igor in #2689, removing and replacing form_buffers from ActiveAdmin::FormBuilder. As a bonus allows 'inputs', etc. instead of 'f.inputs' in DSL. Allowing Arbre within has_many block deferred as a second step. May break existing code that mixes ERB inside active_admin_form_for in a template. Can also break other code that makes assumptions about the context of the block, see fix to active_admin_comments.rb included.

@timoschilling

Copy link
Copy Markdown
Member

Can you add some examples into the readme and/or the docs

@zorab47

zorab47 commented Oct 17, 2014

Copy link
Copy Markdown
Contributor

Wow, awesome work. 😸

@varyonic varyonic closed this Oct 19, 2014
@varyonic varyonic deleted the 2542-arbe-buffering-inside-aa-forms branch October 19, 2014 21:51
@varyonic varyonic restored the 2542-arbe-buffering-inside-aa-forms branch October 19, 2014 22:10
@varyonic varyonic reopened this Oct 19, 2014
@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from 3a1e1bd to 259f2cd Compare October 19, 2014 22:38
@timoschilling

Copy link
Copy Markdown
Member

Is the old way still supported?

@timoschilling

Copy link
Copy Markdown
Member

An the fist look it's great! 👍

Please apply my notes and make repush, to get more overview

@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from 259f2cd to 774c5f0 Compare October 21, 2014 00:52
@timoschilling

Copy link
Copy Markdown
Member

I'm not sure, but c10a6c4 can bring problems to the developer.
@seanlinsley what is your opinion to c10a6c4?

@timoschilling

Copy link
Copy Markdown
Member

I think many users use f.form_buffers in there code. @varyonic and @seanlinsley how should we deal with that?

def form_buffers
  raise "`form_buffers` has removed from ActiveAdmin:: FormBuilder, please read https://github.com/activeadmin/activeadmin/blob/master/docs/5-forms.md for details."
end

@Fivell

Fivell commented Oct 23, 2014

Copy link
Copy Markdown
Member

Agree about f.form_buffers , we have too many projects using AA from edge, this change is critical for us ...

@varyonic

Copy link
Copy Markdown
Contributor Author

@timoschilling I added a backwardly compatible form_buffers method with a deprecation warning.

@seanlinsley

Copy link
Copy Markdown
Contributor

I'd rather just raise an error. The next release is going to be 1.0.0, and we'll be following semantic versioning. I really don't want that cruft in the code base until 2.0.0

@timoschilling

Copy link
Copy Markdown
Member

@varyonic nice work, but I have the same meaning as @seanlinsley

@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from 474cfbd to 1a8fcf0 Compare October 25, 2014 00:34
@varyonic

Copy link
Copy Markdown
Contributor Author

Moved backwardly compatible version of form_buffers to https://gist.github.com/varyonic/542c37648de91a02402a If anyone decides to use it please star and comment on the gist.

@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from 1a8fcf0 to d7e8d73 Compare October 25, 2014 01:05
@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from d7e8d73 to c024ce3 Compare October 25, 2014 01:17
@varyonic varyonic force-pushed the 2542-arbe-buffering-inside-aa-forms branch from c024ce3 to 3570bfa Compare October 25, 2014 01:27
@timoschilling

Copy link
Copy Markdown
Member

@varyonic thanks for your great work on this!!! 👍 ❤️

timoschilling added a commit that referenced this pull request Oct 25, 2014
…forms

Convert active_admin_form_for to Arbre component - resolves #2542
@timoschilling timoschilling merged commit d775bb9 into activeadmin:master Oct 25, 2014
@varyonic varyonic deleted the 2542-arbe-buffering-inside-aa-forms branch October 27, 2014 13:40
brianswko pushed a commit to lumoslabs/ActiveAdmin-Globalize3-inputs that referenced this pull request Jun 1, 2015
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.

Arbre doesn't buffer inside AA forms

5 participants