kelredd-resourceful 0.7.13 → 0.7.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module Resourceful
15
15
  config ||= {}
16
16
  raise ArgumentError, "has_many_resourceful requires a :class_name option to be specified" unless config[:class_name]
17
17
  class_name = config.delete(:class_name).to_s
18
- find_method_name = config.delete(:method).to_s || 'find'
18
+ find_method_name = (config.delete(:method) || 'find').to_s
19
19
  force = config.delete(:force) || true
20
20
  define_method(name) do
21
21
  klass = class_name.resourceful_constantize
@@ -39,7 +39,7 @@ module Resourceful
39
39
  raise ArgumentError, "belongs_to_resourceful requires a :class_name option to be specified" unless config[:class_name]
40
40
  class_name = config.delete(:class_name).to_s
41
41
  foreign_key = config.delete(:foreign_key) || "#{clean_name}_id"
42
- find_method_name = config.delete(:method).to_s || 'find'
42
+ find_method_name = (config.delete(:method) || 'find').to_s
43
43
  force = config.delete(:force) || true
44
44
  define_method(name) do
45
45
  klass = class_name.resourceful_constantize
@@ -15,7 +15,7 @@ module Resourceful
15
15
  config ||= {}
16
16
  raise ArgumentError, "has_many requires a :class option to be specified" unless config[:class]
17
17
  class_name = config.delete(:class).to_s
18
- find_method_name = config.delete(:method).to_s || 'find'
18
+ find_method_name = (config.delete(:method) || 'find').to_s
19
19
  force = config.delete(:force) || true
20
20
  define_method(name) do
21
21
  klass = self.class.get_namespaced_klass(class_name)
@@ -39,7 +39,7 @@ module Resourceful
39
39
  raise ArgumentError, "belongs_to requires a :class option to be specified" unless config[:class]
40
40
  class_name = config.delete(:class).to_s
41
41
  foreign_key = config.delete(:foreign_key) || "#{clean_name}_id"
42
- find_method_name = config.delete(:method).to_s || 'find'
42
+ find_method_name = (config.delete(:method) || 'find').to_s
43
43
  force = config.delete(:force) || true
44
44
  define_method(name) do
45
45
  klass = self.class.get_namespaced_klass(class_name)
@@ -3,7 +3,7 @@ module Resourceful
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 7
6
- TINY = 13
6
+ TINY = 14
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kelredd-resourceful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.13
4
+ version: 0.7.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding