model_subsets 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/lib/model_subsets.rb CHANGED
@@ -153,12 +153,6 @@ module ModelSubsets
153
153
  options[:fieldsets] = @fieldsets.reject{ |k,v| v[:options][:opt_in] }.keys
154
154
  end
155
155
 
156
- # Handle additional fieldsets list
157
- if options[:add]
158
- options[:add] = [options[:add]] unless options[:add].is_a?(Array)
159
- options[:fieldsets] |= options[:add]
160
- end
161
-
162
156
  # Handle fieldsets restriction list
163
157
  if options[:only]
164
158
  options[:only] = [options[:only]] unless options[:only].is_a?(Array)
@@ -171,6 +165,12 @@ module ModelSubsets
171
165
  options[:fieldsets] -= options[:except]
172
166
  end
173
167
 
168
+ # Handle additional fieldsets list
169
+ if options[:add]
170
+ options[:add] = [options[:add]] unless options[:add].is_a?(Array)
171
+ options[:fieldsets] |= options[:add]
172
+ end
173
+
174
174
  # Handle scopes
175
175
  options[:scopes] ||= []
176
176
  options[:scopes] = [options[:scopes]] unless options[:scopes].is_a?(Array)
@@ -1,3 +1,3 @@
1
1
  module ModelSubsets
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["gauthier.delacroix@gmail.com"]
7
7
  gem.description = %q{ModelSubsets provides ability to split a single model into fields and properties subsets}
8
8
  gem.summary = %q{Subsets management for Rails models}
9
- gem.homepage = "https://github.com/porecreat/model_subets"
9
+ gem.homepage = "https://github.com/porecreat/model_subsets"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_subsets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-18 00:00:00.000000000 Z
12
+ date: 2012-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -43,7 +43,7 @@ files:
43
43
  - lib/model_subsets.rb
44
44
  - lib/model_subsets/version.rb
45
45
  - model_subsets.gemspec
46
- homepage: https://github.com/porecreat/model_subets
46
+ homepage: https://github.com/porecreat/model_subsets
47
47
  licenses: []
48
48
  post_install_message:
49
49
  rdoc_options: []
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  version: '0'
64
64
  requirements: []
65
65
  rubyforge_project:
66
- rubygems_version: 1.8.23
66
+ rubygems_version: 1.8.24
67
67
  signing_key:
68
68
  specification_version: 3
69
69
  summary: Subsets management for Rails models