rocket_cms 0.25.5 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96655d05804f4c89771955899b6cdf7ac4fcc77111c962629cfa2a8d1863ded5
4
- data.tar.gz: a2c43b4b0061591211c894f098414a8d6e0bf7fe407e046c672aa595b3acfdf2
3
+ metadata.gz: 80b31873aa07fefba9f0cb9ff3c8ebcacad47ae96cfb92ec8873f4664573240c
4
+ data.tar.gz: c63b35ad8a73a8abec0ee8998e747a5fe82ae04701b524742b9042d0f4cc32f3
5
5
  SHA512:
6
- metadata.gz: f40a313f644e57f19ea6370f6914ecd0a0cbdb49e4310206bc9f61e24e18cdf93af3d9ccd74524de343165a1bc610925ac0c599a004b5f2e7315b68e877f3e8e
7
- data.tar.gz: 6a9fd0a50b898c6c9ff7da3d283bbf15f7f85d9718bb14a046d373d1eafdf4997234374012bb665a79d617bd593d793045281500a40b401fba165deaeb018e7a
6
+ metadata.gz: e6d5b503afa1800a80449ea53ec019a206431eb5cdc70382cea224bf1eb8fb299211ce6294d93a6f2a297c828a98a253682007fc25a07c3847cdd5bd6574c8dc
7
+ data.tar.gz: 4e8288684832f355cf05a4149ae02438ebf44c400a4ddcf5894997fd3b8652ef11699155a4e7621d6a11d70e5645cb001ef59bcfcb59969952faf7fcdc43f72c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.25.5)
4
+ rocket_cms (0.26.0)
5
5
  addressable
6
6
  coffee-rails
7
7
  jquery-rails
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = '0.25.5'
2
+ VERSION = '0.26.0'
3
3
  end
data/template.rb CHANGED
@@ -25,7 +25,7 @@ git_source(:github) do |repo_name|
25
25
  end
26
26
  '}
27
27
  gem 'rails', '5.2.0.rc2'
28
- #{if mongoid then "gem 'mongoid', '~> 6.1.0'" else "gem 'pg', '~> 0.21.0'" end}
28
+ #{if mongoid then "gem 'mongoid', '~> 6.1.0'" else "gem 'pg', '>= 0.18', '< 2.0'" end}
29
29
 
30
30
  gem 'sass'
31
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.5
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -260,7 +260,6 @@ files:
260
260
  - config/locales/ru.devise.yml
261
261
  - config/locales/ru.kaminari.yml
262
262
  - config/locales/ru.models.yml
263
- - config/locales/ru.mongoid.yml
264
263
  - config/locales/ru.rails_admin.yml
265
264
  - config/locales/ru.rocket_admin.yml
266
265
  - config/locales/ru.rs.yml
@@ -1,491 +0,0 @@
1
- ru:
2
- mongoid:
3
- errors:
4
- messages:
5
- blank_in_locale:
6
- "can't be blank in %{location}"
7
- message_title: "message"
8
- summary_title: "summary"
9
- resolution_title: "resolution"
10
- ambiguous_relationship:
11
- message: "Ambiguous relations %{candidates} defined on %{klass}."
12
- summary:
13
- "When Mongoid attempts to set an inverse document of a relation
14
- in memory, it needs to know which relation it belongs to. When
15
- setting %{name}, Mongoid looked on the class %{inverse}
16
- for a matching relation, but multiples were found that could
17
- potentially match: %{candidates}."
18
- resolution: "On the %{name} relation on %{inverse} you must add an
19
- :inverse_of option to specify the exact relationship on %{klass}
20
- that is the opposite of %{name}."
21
- callbacks:
22
- message: "Calling %{method} on %{klass} resulted in a false return
23
- from a callback."
24
- summary: "If a before callback returns false when using Document.create!,
25
- Document#save!, or Document#update_attributes! this error will get raised
26
- since the document did not actually get saved."
27
- resolution: "Double check all before callbacks to make sure they are
28
- not unintentionally returning false."
29
- calling_document_find_with_nil_is_invalid:
30
- message: "Calling Document.find with nil is invalid."
31
- summary: "Document.find expects the parameters to be 1 or more ids, and
32
- will return a single document if 1 id is provided, otherwise an array
33
- of documents if multiple ids are provided."
34
- resolution: "Most likely this is caused by passing parameters directly
35
- through to the find, and the parameter either is not present or the
36
- key from which it is accessed is incorrect."
37
- document_not_destroyed:
38
- message: "%{klass} with id %{id} was not destroyed."
39
- summary: "When calling %{klass}#destroy! and a callback halts the destroy
40
- callback chain by returning a false value, the deletion will not
41
- actually occur."
42
- resolution: "Check the before/after destroy callbacks to ensure that the
43
- return values are truthy for the chain to continue."
44
- document_not_found:
45
- message: "Document(s) not found for class %{klass} with id(s) %{missing}."
46
- summary: "When calling %{klass}.find with an id or array of ids, each
47
- parameter must match a document in the database or this error will be
48
- raised. The search was for the id(s): %{searched} (%{total} total)
49
- and the following ids were not found: %{missing}."
50
- resolution: "Search for an id that is in the database or set
51
- the Mongoid.raise_not_found_error configuration option to false,
52
- which will cause a nil to be returned instead of raising this error when
53
- searching for a single id, or only the matched documents when searching
54
- for multiples."
55
- document_with_attributes_not_found:
56
- message: "Document not found for class %{klass} with attributes %{attributes}."
57
- summary: "When calling %{klass}.find_by with a hash of attributes, all
58
- attributes provided must match a document in the database or this error
59
- will be raised."
60
- resolution: "Search for attributes that are in the database or set
61
- the Mongoid.raise_not_found_error configuration option to false,
62
- which will cause a nil to be returned instead of raising this error."
63
- eager_load:
64
- message: "Eager loading :%{name} is not supported since it is a
65
- polymorphic belongs_to relation."
66
- summary: "Mongoid cannot currently determine the classes it needs to
67
- eager load when the relation is polymorphic. The parents reside in
68
- different collections so a simple id lookup is not sufficient enough."
69
- resolution: "Don't attempt to perform this action and have patience,
70
- maybe this will be supported in the future."
71
- invalid_collection:
72
- message: "Access to the collection for %{klass} is not allowed."
73
- summary: "%{klass}.collection was called, and %{klass} is an embedded
74
- document - it resides within the collection of the root document of
75
- the hierarchy."
76
- resolution: "For access to the collection that the embedded document is
77
- in, use %{klass}#_root.collection, or do not attempt to persist an
78
- embedded document without a parent set."
79
- invalid_config_option:
80
- message: "Invalid configuration option: %{name}."
81
- summary: "A invalid configuration option was provided in your
82
- mongoid.yml, or a typo is potentially present. The valid configuration
83
- options are: %{options}."
84
- resolution: "Remove the invalid option or fix the typo. If you were
85
- expecting the option to be there, please consult the following page
86
- with repect to Mongoid's configuration:\n\n
87
- \_\_http://mongoid.org/en/mongoid/docs/installation.html"
88
- invalid_field:
89
- message: "Defining a field named '%{name}' is not allowed."
90
- summary: "Defining this field would override the method '%{name}',
91
- which would cause issues with expectations around the original
92
- method and cause extremely hard to debug issues. The original
93
- method was defined in:\n
94
- \_\_Object: %{origin}\n
95
- \_\_File: %{file}\n
96
- \_\_Line: %{line}"
97
- resolution: "Use Mongoid.destructive_fields to see what names are not
98
- allowed, and don't use these names. These include names that also
99
- conflict with core Ruby methods on Object, Module, Enumerable, or
100
- included gems that inject methods into these or Mongoid internals."
101
- invalid_field_option:
102
- message: "Invalid option :%{option} provided for field :%{name}."
103
- summary: "Mongoid requires that you only provide valid options on each
104
- field definition in order to prevent unexpected behaviour later on."
105
- resolution: "When defining the field :%{name} on '%{klass}', please provide
106
- valid options for the field. These are currently: %{valid}. If you
107
- meant to define a custom field option, please do so first like so:\n\n
108
- \_\_Mongoid::Fields.option :%{option} do |model, field, value|\n
109
- \_\_\_\_# Your logic here...\n
110
- \_\_end\n
111
- \_\_class %{klass}\n
112
- \_\_\_\_include Mongoid::Document\n
113
- \_\_\_\_field :%{name}, %{option}: true\n
114
- \_\_end\n\n"
115
- invalid_includes:
116
- message: "Invalid includes directive: %{klass}.includes(%{args})"
117
- summary: "Eager loading in Mongoid only supports providing arguments
118
- to %{klass}.includes that are the names of relations on the %{klass}
119
- model, and only supports one level of eager loading. (ie, eager loading
120
- associations not on the %{klass} but one step away via another relation
121
- is not allowed."
122
- resolution: "Ensure that each parameter passed to %{klass}.includes is
123
- a valid name of a relation on the %{klass} model. These are: %{relations}."
124
- invalid_index:
125
- message: "Invalid index specification on %{klass}: %{spec}, %{options}"
126
- summary: "Indexes in Mongoid are defined as a hash of field name and
127
- direction/2d pairs, with a hash for any additional options."
128
- resolution: "Ensure that the index conforms to the correct syntax and
129
- has the correct options.\n\n
130
- Valid options are:\n
131
- \_\_background: true|false\n
132
- \_\_database: 'database_name'\n
133
- \_\_drop_dups: true|false\n
134
- \_\_name: 'index_name'\n
135
- \_\_sparse: true|false\n
136
- \_\_unique: true|false\n
137
- \_\_min: 1\n
138
- \_\_max: 1\n
139
- \_\_bits: 26\n
140
- \_\_bucket_size : 1\n
141
- \_\_weights: { content: 1, title: 2 }\n
142
- \_\_expire_after_seconds: number_of_seconds\n
143
- Valid types are: 1, -1, '2d', '2dsphere', 'geoHaystack', 'text', 'hashed'\n\n
144
- Example:\n
145
- \_\_class Band\n
146
- \_\_\_\_include Mongoid::Document\n
147
- \_\_\_\_index({ name: 1, label: -1 }, { sparse: true })\n
148
- \_\_\_\_index({ location: '2d' }, { background: true })\n
149
- \_\_end\n\n"
150
- invalid_options:
151
- message: "Invalid option :%{invalid} provided to relation :%{name}."
152
- summary: "Mongoid checks the options that are passed to the relation
153
- macros to ensure that no ill side effects occur by letting something
154
- slip by."
155
- resolution: "Valid options are: %{valid}, make sure these are the ones
156
- you are using."
157
- invalid_path:
158
- message: "Having a root path assigned for %{klass} is invalid."
159
- summary: "Mongoid has two different path objects for determining
160
- the location of a document in the database, Root and Embedded.
161
- This error is raised when an embedded document somehow gets a
162
- root path assigned."
163
- resolution: "Most likely your embedded model, %{klass} is also
164
- referenced via a has_many from a root document in another
165
- collection. Double check the relation definitions and fix any
166
- instances where embedded documents are improperly referenced
167
- from other collections."
168
- invalid_persistence_option:
169
- message: "Invalid persistence option :%{invalid}."
170
- summary: "The options used to change the persistence context must be one
171
- of the valid options for a mongo client, or a collection name."
172
- resolution: "Valid options are: %{valid}, make sure these are the ones
173
- you are using."
174
- invalid_relation:
175
- message: "Defining a relation named '%{name}' is not allowed."
176
- summary: "Defining this relation would override the method '%{name}',
177
- which would cause issues with expectations around the original
178
- method and cause extremely hard to debug issues. The original
179
- method was defined in:\n
180
- \_\_Object: %{origin}\n
181
- \_\_File: %{file}\n
182
- \_\_Line: %{line}"
183
- resolution: "Use Mongoid.destructive_fields to see what names are not
184
- allowed, and don't use these names. These include names that also
185
- conflict with core Ruby methods on Object, Module, Enumerable, or
186
- included gems that inject methods into these or Mongoid internals."
187
- invalid_scope:
188
- message: "Defining a scope of value %{value} on %{klass} is not
189
- allowed."
190
- summary: "Scopes in Mongoid must be procs that wrap criteria objects."
191
- resolution: "Change the scope to be a proc wrapped critera.\n\n
192
- Example:\n
193
- \_\_class Band\n
194
- \_\_\_\_include Mongoid::Document\n
195
- \_\_\_\_scope :inactive, ->{ where(active: false) }\n
196
- \_\_end\n\n"
197
- invalid_storage_options:
198
- message: "Invalid options passed to %{klass}.store_in: %{options}."
199
- summary: "The :store_in macro takes only a hash of parameters with
200
- the keys :database, :collection, or :client."
201
- resolution: "Change the options passed to store_in to match the
202
- documented API, and ensure all keys in the options hash are
203
- symbols.\n\n
204
- Example:\n
205
- \_\_class Band\n
206
- \_\_\_\_include Mongoid::Document\n
207
- \_\_\_\_store_in collection: 'artists', database: 'secondary'\n
208
- \_\_end\n\n"
209
- invalid_storage_parent:
210
- message: "Invalid store_in call on class %{klass}."
211
- summary: "The :store_in macro can only be called on a base Mongoid Document"
212
- resolution: "Remove the store_in call on class %{klass}, as it will use its
213
- parent store configuration. Or remove the hierarchy extension for this
214
- class."
215
- invalid_time:
216
- message: "'%{value}' is not a valid Time."
217
- summary: "Mongoid tries to serialize the values for Date, DateTime, and
218
- Time into proper UTC times to store in the database. The provided
219
- value could not be parsed."
220
- resolution: "Make sure to pass parsable values to the field setter
221
- for Date, DateTime, and Time objects. When this is a String it needs
222
- to be valid for Time.parse. Other objects must be valid to pass to
223
- Time.local."
224
- inverse_not_found:
225
- message: "When adding a(n) %{klass} to %{base}#%{name}, Mongoid could
226
- not determine the inverse foreign key to set. The attempted key was
227
- '%{inverse}'."
228
- summary: "When adding a document to a relation, Mongoid attempts
229
- to link the newly added document to the base of the relation in
230
- memory, as well as set the foreign key to link them on the
231
- database side. In this case Mongoid could not determine what the
232
- inverse foreign key was."
233
- resolution: "If an inverse is not required, like a belongs_to or
234
- has_and_belongs_to_many, ensure that :inverse_of => nil is set
235
- on the relation. If the inverse is needed, most likely the
236
- inverse cannot be figured out from the names of the relations and
237
- you will need to explicitly tell Mongoid on the relation what
238
- the inverse is.\n\n
239
- Example:\n
240
- \_\_class Lush\n
241
- \_\_\_\_include Mongoid::Document\n
242
- \_\_\_\_has_one :whiskey, class_name: \"Drink\", inverse_of: :alcoholic\n
243
- \_\_end\n\n
244
- \_\_class Drink\n
245
- \_\_\_\_include Mongoid::Document\n
246
- \_\_\_\_belongs_to :alcoholic, class_name: \"Lush\", inverse_of: :whiskey\n
247
- \_\_end"
248
- invalid_set_polymorphic_relation:
249
- message: "The %{name} attribute can't be set to an instance of
250
- %{other_klass} as %{other_klass} has multiple relations referencing
251
- %{klass} as %{name}."
252
- summary: "If the parent class of a polymorphic relation has multiple
253
- definitions for the same relation, the values must be set from the
254
- parent side and not the child side since Mongoid cannot determine
255
- from the child side which relation to go in."
256
- resolution: "Set the values from the parent, or redefine the relation
257
- with only a single definition in the parent."
258
- invalid_value:
259
- message: "Value of type %{value_class} cannot be written to a field of type %{field_class}"
260
- summary: "Tried to set a value of type %{value_class} to a field of type %{field_class}"
261
- resolution: "Verify if the value to be set correspond to field definition"
262
- mixed_relations:
263
- message: "Referencing a(n) %{embedded} document from the %{root}
264
- document via a relational association is not allowed since the
265
- %{embedded} is embedded."
266
- summary: "In order to properly access a(n) %{embedded} from %{root}
267
- the reference would need to go through the root document of
268
- %{embedded}. In a simple case this would require Mongoid to store
269
- an extra foreign key for the root, in more complex cases where
270
- %{embedded} is multiple levels deep a key would need to be stored
271
- for each parent up the hierarchy."
272
- resolution: "Consider not embedding %{embedded}, or do the key
273
- storage and access in a custom manner in the application code."
274
- mixed_client_configuration:
275
- message: "Both uri and standard configuration options defined for
276
- client: '%{name}'."
277
- summary: "Instead of simply giving uri or standard options a
278
- preference order, Mongoid assumes that you have made a mistake in
279
- your configuration and requires that you provide one or the other,
280
- but not both. The options that were provided were: %{config}."
281
- resolution: "Provide either only a uri as configuration or only
282
- standard options."
283
- nested_attributes_metadata_not_found:
284
- message: "Could not find metadata for relation '%{name}' on model:
285
- %{klass}."
286
- summary: "When defining nested attributes for a relation, Mongoid
287
- needs to access the metadata for the relation '%{name}' in order
288
- if add autosave functionality to it, if applicable. Either no
289
- relation named '%{name}' could be found, or the relation had not
290
- been defined yet."
291
- resolution: "Make sure that there is a relation defined named
292
- '%{name}' on %{klass} or that the relation definition comes before
293
- the accepts_nested_attributes_for macro in the model - order
294
- matters so that Mongoid has access to the metadata.\n\n
295
- Example:\n
296
- \_\_class Band\n
297
- \_\_\_\_include Mongoid::Document\n
298
- \_\_\_\_has_many :albums\n
299
- \_\_\_\_accepts_nested_attributes_for :albums\n
300
- \_\_end\n\n"
301
- no_default_client:
302
- message: "No default client configuration is defined."
303
- summary: "The configuration provided settings for: %{keys}, but
304
- Mongoid requires a :default to be defined at minimum."
305
- resolution: "If configuring via a mongoid.yml, ensure that within
306
- your :clients section a :default client is defined.\n\n
307
- Example:\n
308
- \_\_development:\n
309
- \_\_\_\_clients:\n
310
- \_\_\_\_\_\_default:\n
311
- \_\_\_\_\_\_\_\_hosts:\n
312
- \_\_\_\_\_\_\_\_\_\_- localhost:27017\n\n"
313
- no_environment:
314
- message: "Could not load the configuration since no environment
315
- was defined."
316
- summary: "Mongoid attempted to find the appropriate environment
317
- but no Rails.env, Sinatra::Base.environment, RACK_ENV, or
318
- MONGOID_ENV could be found."
319
- resolution: "Make sure some environment is set from the mentioned
320
- options. Mongoid cannot load configuration from the yaml without
321
- knowing which environment it is in, and we have considered
322
- defaulting to development an undesireable side effect of this not
323
- being defined."
324
- no_map_reduce_output:
325
- message: "No output location was specified for the map/reduce
326
- operation."
327
- summary: "When executing a map/reduce, you must provide the output
328
- location of the results. The attempted command was: %{command}."
329
- resolution: "Provide the location that the output of the operation
330
- is to go by chaining an #out call to the map/reduce.\n\n
331
- Example:\n
332
- \_\_Band.map_reduce(map, reduce).out(inline: 1)\n\n
333
- Valid options for the out function are:\n
334
- \_\_inline: 1\n
335
- \_\_merge: 'collection-name'\n
336
- \_\_replace: 'collection-name'\n
337
- \_\_reduce: 'collection-name'\n\n"
338
- no_metadata:
339
- message: "Metadata not found for document of type %{klass}."
340
- summary: "Mongoid sets the metadata of a relation on the document
341
- when it is either loaded from within the relation, or added to
342
- one. The presence of the metadata is required in order to
343
- provide various functionality around relations. Most likely you
344
- are getting this error because the document is embedded and was
345
- attempted to be persisted without being associated with a parent,
346
- or the relation was not properly defined."
347
- resolution: "Ensure that your relations on the %{klass} model
348
- are all properly defined, and that the inverse relations
349
- are also properly defined. Embedded relations must have both the
350
- parent (embeds_one/embeds_many) and the inverse (embedded_in)
351
- present in order to work properly."
352
- no_parent:
353
- message: "Cannot persist embedded document %{klass} without a
354
- parent document."
355
- summary: "If the document is embedded, in order to be persisted it
356
- must always have a reference to its parent document. This is
357
- most likely caused by either calling %{klass}.create or
358
- %{klass}.create! without setting the parent document as an
359
- attribute."
360
- resolution: "Ensure that you've set the parent relation if
361
- instantiating the embedded document directly, or always create new
362
- embedded documents via the parent relation."
363
- no_client_config:
364
- message: "No configuration could be found for a client named
365
- '%{name}'."
366
- summary: "When attempting to create the new client, Mongoid could
367
- not find a client configuration for the name: '%{name}'. This is
368
- necessary in order to know the host, port, and options needed
369
- to connect."
370
- resolution: "Double check your mongoid.yml to make sure under the
371
- clients key that a configuration exists for '%{name}'. If you
372
- have set the configuration programatically, ensure that '%{name}'
373
- exists in the configuration hash."
374
- no_clients_config:
375
- message: "No clients configuration provided."
376
- summary: "Mongoid's configuration requires that you provide details
377
- about each client that can be connected to, and requires in
378
- the clients config at least 1 default client to exist."
379
- resolution: "Double check your mongoid.yml to make sure that you
380
- have a top-level clients key with at least 1 default client
381
- configuration for it. You can regenerate a new mongoid.yml for
382
- assistance via `rails g mongoid:config`.\n\n
383
- Example:\n
384
- \_\_development:\n
385
- \_\_\_\_clients:\n
386
- \_\_\_\_\_\_default:\n
387
- \_\_\_\_\_\_\_\_database: mongoid_dev\n
388
- \_\_\_\_\_\_\_\_hosts:\n
389
- \_\_\_\_\_\_\_\_\_\_- localhost:27017\n\n"
390
- no_client_database:
391
- message: "No database provided for client configuration: :%{name}."
392
- summary: "Each client configuration must provide a database so Mongoid
393
- knows where the default database to persist to. What was provided
394
- was: %{config}."
395
- resolution: "If configuring via a mongoid.yml, ensure that within
396
- your :%{name} section a :database value for the client's default
397
- database is defined.\n\n
398
- Example:\n
399
- \_\_development:\n
400
- \_\_\_\_clients:\n
401
- \_\_\_\_\_\_%{name}:\n
402
- \_\_\_\_\_\_\_\_database: my_app_db\n
403
- \_\_\_\_\_\_\_\_hosts:\n
404
- \_\_\_\_\_\_\_\_\_\_- localhost:27017\n\n"
405
- no_client_hosts:
406
- message: "No hosts provided for client configuration: :%{name}."
407
- summary: "Each client configuration must provide hosts so Mongoid
408
- knows where the database server is located. What was provided
409
- was: %{config}."
410
- resolution: "If configuring via a mongoid.yml, ensure that within
411
- your :%{name} section a :hosts value for the client hosts is
412
- defined.\n\n
413
- Example:\n
414
- \_\_development:\n
415
- \_\_\_\_clients:\n
416
- \_\_\_\_\_\_%{name}:\n
417
- \_\_\_\_\_\_\_\_database: my_app_db\n
418
- \_\_\_\_\_\_\_\_hosts:\n
419
- \_\_\_\_\_\_\_\_\_\_- localhost:27017\n\n"
420
- readonly_attribute:
421
- message: "Attempted to set the readonly attribute '%{name}' with
422
- the value: %{value}."
423
- summary: "Attributes flagged as readonly via Model.attr_readonly
424
- can only have values set when the document is a new record."
425
- resolution: "Don't define '%{name}' as readonly, or do not attempt
426
- to update its value after the document is persisted."
427
- readonly_document:
428
- message: "Attempted to persist the readonly document '%{klass}'."
429
- summary: "Documents loaded from the database using #only
430
- cannot be persisted."
431
- resolution: "Don't attempt to persist documents that are flagged as
432
- readonly."
433
- scope_overwrite:
434
- message: "Cannot create scope :%{scope_name}, because of existing
435
- method %{model_name}.%{scope_name}."
436
- summary: "When defining a scope that conflicts with a method that
437
- already exists on the model, this error will get raised if
438
- Mongoid.scope_overwrite_exception is set to true."
439
- resolution: "Change the name of the scope so it does not conflict
440
- with the already defined method %{model_name}, or set the
441
- configuration option Mongoid.scope_overwrite_exception to false,
442
- which is its default. In this case a warning will be logged."
443
- taken:
444
- "is already taken"
445
- too_many_nested_attribute_records:
446
- message: "Accepting nested attributes for %{association} is limited
447
- to %{limit} records."
448
- summary: "More documents were sent to be processed than the allowed
449
- limit."
450
- resolution: "The limit is set as an option to the macro, for example:
451
- accepts_nested_attributes_for :%{association}, limit: %{limit}.
452
- Consider raising this limit or making sure no more are sent than
453
- the set value."
454
- unknown_attribute:
455
- message: "Attempted to set a value for '%{name}' which is not
456
- allowed on the model %{klass}."
457
- summary: "Without including Mongoid::Attributes::Dynamic in your model
458
- and the attribute does not already exist in the attributes hash,
459
- attempting to call %{klass}#%{name}= for it is not allowed. This is
460
- also triggered by passing the attribute to any method that accepts an
461
- attributes hash, and is raised instead of getting a NoMethodError."
462
- resolution: "You can include Mongoid::Attributes::Dynamic if you
463
- expect to be writing values for undefined fields often."
464
- unsaved_document:
465
- message: "Attempted to save %{document} before the parent %{base}."
466
- summary: "You cannot call create or create! through the
467
- relation (%{document}) whose parent (%{base}) is
468
- not already saved. This would cause the database to be out of sync
469
- since the child could potentially reference a nonexistent parent."
470
- resolution: "Make sure to only use create or create! when the parent
471
- document %{base} is persisted."
472
- unsupported_javascript:
473
- message: "Executing Javascript $where selector on an embedded criteria
474
- is not supported."
475
- summary: "Mongoid only supports providing a hash of arguments to
476
- #where criterion on embedded documents. Since %{klass} is embedded,
477
- the expression %{javascript} is not allowed."
478
- resolution: "Please provide a standard hash to #where when the criteria
479
- is for an embedded relation."
480
- validations:
481
- message: "Validation of %{document} failed."
482
- summary: "The following errors were found: %{errors}"
483
- resolution: "Try persisting the document with valid data or remove
484
- the validations."
485
- delete_restriction:
486
- message: "Cannot delete %{document} because of dependent '%{relation}'."
487
- summary: "When defining '%{relation}' with a :dependent => :restrict,
488
- Mongoid will raise an error when attempting to delete the
489
- %{document} when the child '%{relation}' still has documents in it."
490
- resolution: "Don't attempt to delete the parent %{document} when
491
- it has children, or change the dependent option on the relation."