assignable_values 0.14.0 → 0.16.2

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.
@@ -10,7 +10,7 @@ database.rewrite_schema! do
10
10
  t.string :genre
11
11
  t.integer :year
12
12
  t.integer :duration
13
- t.string :genres, :array => true
13
+ t.string :multi_genres, :array => true
14
14
  end
15
15
 
16
16
  create_table :vinyl_recordings do |t|
@@ -12,7 +12,13 @@ en:
12
12
  genre:
13
13
  pop: 'Pop music'
14
14
  rock: 'Rock music'
15
- sub_genre:
15
+ multi_genres:
16
+ pop: 'Pop music'
17
+ rock: 'Rock music'
18
+ virtual_multi_genres:
19
+ pop: 'Pop music'
20
+ rock: 'Rock music'
21
+ virtual_sub_genre:
16
22
  pop: 'Pop music'
17
23
  rock: 'Rock music'
18
24
  year:
@@ -8,11 +8,11 @@ class Song < ActiveRecord::Base
8
8
 
9
9
  belongs_to :artist
10
10
 
11
- attr_accessor :sub_genre, :sub_genres
11
+ attr_accessor :virtual_sub_genre, :virtual_sub_genres, :virtual_multi_genres
12
12
 
13
- if ActiveRecord::VERSION::MAJOR < 4 || !Song.new(:genres => ['test']).genres.is_a?(Array)
13
+ if ActiveRecord::VERSION::MAJOR < 4 || !Song.new(:multi_genres => ['test']).multi_genres.is_a?(Array)
14
14
  # Rails 4 or not postgres
15
- serialize :genres
15
+ serialize :multi_genres
16
16
  end
17
17
 
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assignable_values
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -36,23 +36,25 @@ files:
36
36
  - ".travis.yml"
37
37
  - CHANGELOG.md
38
38
  - Gemfile
39
+ - Gemfile.2.3
40
+ - Gemfile.2.3.lock
41
+ - Gemfile.3.2
42
+ - Gemfile.3.2.lock
43
+ - Gemfile.4.2
44
+ - Gemfile.4.2.lock
45
+ - Gemfile.5.0
46
+ - Gemfile.5.0.lock
47
+ - Gemfile.5.1
48
+ - Gemfile.5.1.lock
49
+ - Gemfile.5.1.pg
50
+ - Gemfile.5.1.pg.lock
51
+ - Gemfile.6.0.pg
52
+ - Gemfile.6.0.pg.lock
39
53
  - Gemfile.lock
40
54
  - LICENSE
41
55
  - README.md
42
56
  - Rakefile
43
57
  - assignable_values.gemspec
44
- - gemfiles/Gemfile.2.3
45
- - gemfiles/Gemfile.2.3.lock
46
- - gemfiles/Gemfile.3.2
47
- - gemfiles/Gemfile.3.2.lock
48
- - gemfiles/Gemfile.4.2
49
- - gemfiles/Gemfile.4.2.lock
50
- - gemfiles/Gemfile.5.0
51
- - gemfiles/Gemfile.5.0.lock
52
- - gemfiles/Gemfile.5.1
53
- - gemfiles/Gemfile.5.1.lock
54
- - gemfiles/Gemfile.5.1.pg
55
- - gemfiles/Gemfile.5.1.pg.lock
56
58
  - lib/assignable_values.rb
57
59
  - lib/assignable_values/active_record.rb
58
60
  - lib/assignable_values/active_record/restriction/base.rb
@@ -89,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  - !ruby/object:Gem::Version
90
92
  version: '0'
91
93
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.7.6
94
+ rubygems_version: 3.0.3
94
95
  signing_key:
95
96
  specification_version: 4
96
97
  summary: Restrict the values assignable to ActiveRecord attributes or associations