Comments (2)
I have been working on this. Seems to be easy to do, thanks to ActiveModel. By default we are protecting id and inheritance attribute for single table inheritance models from being mass assigned. Meaning that for instance doing this: person.update_attributes(:id => 'new_id')
will filter away id. That is a good thing so we don't allow people to manipulating ids.
Another situation which is affected by this is when doing Person.new(:id => 'an_id')
. This will no longer work; instead, we must now do person = Person.new; person.id = 'an_id'
(or just use default_id
). I thought about allowing mass assignment of id when doing Person.new
, and disallow it on person.attributes = a_has_of_attributes
, but I found it to be way too risky and the chances of someone doing Person.new(params[:person])
without thinking about it's implications was too big.
So, I would say chances are good for this feature to break old code, but we need to have this in place :-)
from massive_record.
Implemented in develop: 88eadbc
from massive_record.
Related Issues (20)
- Supporting date/time form helpers
- embedded.destroy should also remove itself from parent collection?
- Error when using embeds_many.destroy_all
- Extend proxies with module / give it a block with logic to include
- Not detecting changes in new records
- Have been reported some issues with callbacks on embedded records HOT 2
- Returning false in ex. before_save does not short circuit save if saved through parent
- Nedsted attributes
- Limit scan to a specified timeStamp
- Query HOT 6
- Hard Dependency On Older Version of ActiveSupport in 0.2.2.rc1 & 0.2.2.rc2 HOT 4
- Inheritance and table_name HOT 3
- `IOError: closed stream` after sending an invalid query HOT 4
- What type to use for binary fields? HOT 1
- Memory leak with find operation
- Rails 3.2.2 Deprecation Warnings HOT 1
- Is this correct code? HOT 1
- Is still mantained? HOT 2
- What's the correct way to create/migrate hbase tables using this gem? HOT 4
- Dead Links in wiki HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from massive_record.