-
Notifications
You must be signed in to change notification settings - Fork 46
/
TODO
49 lines (32 loc) · 1.65 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
x custom_fields_for :self
x get rid of <instance>.build_metadata
(- what happens if we call build_metadata and add a new custom field ?)
-> resetting / invalidate the proxy klass.... ? => features (workaround: reload the class)
x apply patches from locomotive
- upgrade to mongoid 2.3.2
- bundle exec rspec spec/unit/custom_fields_for_spec.rb:145
- metadata is not defined correctly in the field class
=== MIGRATION from 1.0.0 to 1.1.0
# http://pivotallabs.com/users/lee/blog/articles/1548-mongoid-migrations-using-the-mongo-driver
mongo_db = ContentType.db
content_type_hashes = mongo_db.collection('content_types').find({}, :fields => ["content_custom_fields"])
content_type_hashes.each do |content_type_hash|
#create the new field
mongo_db.collection("content_types").update({"_id" => content_type_hash["_id"]}, {"$set" => {"contents_custom_fields" => content_type_hash["content_custom_fields"] }})
#remove the old field from collection
mongo_db.collection("content_types").update({"_id" => content_type_hash["_id"]}, {"$unset" => { "content_custom_fields" => 1}})
end
=== EXPERIMENTAL ===
x posts.build => doit rajouter le custom_fields_recipe automatiquement
x target custom fields
x ajoute des methods a la classe target => Recipe ?
x types:
x picker
x has_many / belongs_to
- tags: https://github.com/wilkerlucio/mongoid_taggable
- cases not handled-
- when we modify the name of a belongs_to field, we also need to check if there are has_many relationships out of there
- localized field -> non localized
- non localized field -> localized
- upgrade to rails 3.2
- carrierwave: https://github.com/jnicklas/carrierwave/pull/536