Skip to content

Conversation

adoyen
Copy link
Contributor

@adoyen adoyen commented Jun 20, 2012

Hi,
As said in ticket 1007, this issue is not solved by using build. An empty element is still added to the collection when using a tag.

@bryanlarsen
Copy link
Collaborator

Arnaud, can you send me a sample app or test case that demonstrate's
the behaviour? Your patch causes one of the existing tests to fail,
so we need to find a different solution.

Bryan

On Wed, Jun 20, 2012 at 5:07 PM, Arnaud Doyen
[email protected]
wrote:

Hi,
As said in ticket 1007, this issue is not solved by using build. An empty element is still added to the collection when using a tag.

You can merge this Pull Request by running:

 git pull https://github.com/A-Kyma/hobo collection_empty_elem

Or you can view, comment on it, or merge it online at:

 #44

-- Commit Summary --

  • [#1007] target.new and target.build adds new empty element in collection.

-- File Changes --

M hobo_rapid/taglibs/html/a.dryml (2)

-- Patch Links --

 https://github.com/tablatom/hobo/pull/44.patch
 https://github.com/tablatom/hobo/pull/44.diff


Reply to this email directly or view it on GitHub:
#44

@adoyen
Copy link
Contributor Author

adoyen commented Sep 28, 2012

Hi Bryan,
I'll try to have an example application for that issue (if still exists).
Sorry for the delay, I'm not full time at developping hobo application (it's more like a hobby than a real job and I don't have always time for that in the evening)

I keep you informed when I reproduce the issue on a small app.

@al2o3cr
Copy link
Collaborator

al2o3cr commented Sep 28, 2012

There was a change in Rails 3 such that calling (for instance) @blog.posts.new was exactly identical to calling @blog.posts.build - that would explain why this didn't show up on Hobo 1.0.

Haven't tried it, but isn't a case like this exactly why we add the new_candidate method to association collections? - https://github.com/tablatom/hobo/blob/master/hobo/lib/hobo/extensions/active_record/associations/collection.rb#L13

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.

3 participants