This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
add #build / #new
and make << / #push
save like active record does #63
Open
Description
<<
should save, and build
should not.
change push's name to build (be careful push / << may be used internally in Hypermesh) and add a new push which does build(...).save
and returns self.
only allow build on root collections (not scopes) as the scope behavior is to fill in the attributes to match the scope. (see #64)
have to add the old behavior back into the deprecation gem.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]add `#build` and make `<< / #push` act like active record[/-][+]add `#build / #new` and make `<< / #push` save like active record does[/+]sfcgeorge commentedon Feb 9, 2018
Patch for build - just extending current
<<
behaviour to instantiate the model:Sketch of other methods, but I'm not sure the behaviour matches Rails, the docs aren't clear enough so some experimentation and looking at Rails code needed.
catmando commentedon Feb 9, 2018
push and << are aliases
so it would have to be