assignable_values 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/assignable_values/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDE4NmE4ZGNlYWVkMDFjYWVkYzYyNTlhNTQ5NGQ3NGFhOTZkYzg5ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGU2OGRjNjliYTM2ZjU0ODY5MzljY2ZiMWYwY2ViN2FjMDViM2QyNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWJkZjEyYzhmNGZiZWJiYjZmMTAwZTJhYmY0NjU4ZjVlZjFhMTBkYTQ0NDc5
|
10
|
+
ZTZlNTU3Y2Y3NWNjZmU3YWE4YjQ2MDBhNGQ4Nzg1NmYyN2ZmYzhkN2UxMGEy
|
11
|
+
MTUwYmYzM2I5YTcwYmYxMzUxZDk3NjU2MjczZjlkZTRmMTBkYmY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGFmZDgzMmUzZjZiMzdkOTlmNTg4ZjdiN2QxNTY5ODk0ZGQ4NzFhMDA4ZDZh
|
14
|
+
MzEyODllMjFjMDgzZTc5NDMzYzg3M2U0NzkyMTQ4ZTk4OGUzZjM5NzNmYTMz
|
15
|
+
MDkxYjI2NDUwN2M1Njg1ZjQyYzRhOTRmYmYyOGZhYTEyMmQ5MDY=
|
data/README.md
CHANGED
@@ -162,7 +162,7 @@ It will also be returned when obtaining the list of assignable values:
|
|
162
162
|
|
163
163
|
However, if you want only those values that are actually intended to be assignable, e.g. when updating a `<select>` via AJAX, pass an option:
|
164
164
|
|
165
|
-
song.assignable_years(
|
165
|
+
song.assignable_years(include_old_value: false) # => [2010, 2011, 2012]
|
166
166
|
|
167
167
|
Once a changed value has been saved, the previous value disappears from the list of assignable values:
|
168
168
|
|
@@ -206,7 +206,7 @@ Listing and validating als works the same:
|
|
206
206
|
song.valid? # => false
|
207
207
|
|
208
208
|
Similiar to scalar attributes, associations are only validated when the foreign key (`artist_id` in the example above) changes.
|
209
|
-
Values stored in the database will remain assignable until they are changed, and you can query actually assignable values with `song.assignable_artists(
|
209
|
+
Values stored in the database will remain assignable until they are changed, and you can query actually assignable values with `song.assignable_artists(include_old_value: false)`.
|
210
210
|
|
211
211
|
Validation errors will be attached to the association's foreign key (`artist_id` in the example above).
|
212
212
|
|