binarylogic-resourcelogic 0.12.1 → 0.12.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.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 12
@@ -40,7 +40,8 @@ module Resourcelogic
40
40
  # development intact. Maybe you only want to use payments as a context for the
41
41
  # credit cards resource.
42
42
  def child_base_parts(action, url_params)
43
- object_to_use = (url_params.key?("#{model_name}_id".to_sym) && url_params["#{model_name}_id".to_sym]) || (id? && object)
43
+ key = "#{model_name}_id".to_sym
44
+ object_to_use = url_params.key?(key) ? url_params[key] : (id? && object)
44
45
  base_parts = object_to_use || singleton? ? object_url_parts(action, object_to_use) : collection_url_parts(action)
45
46
  base_parts.pop if base_parts.last.is_a?(Hash)
46
47
  base_parts
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{resourcelogic}
5
- s.version = "0.12.1"
5
+ s.version = "0.12.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ben Johnson of Binary Logic"]
9
- s.date = %q{2009-06-28}
9
+ s.date = %q{2009-07-16}
10
10
  s.email = %q{bjohnson@binarylogic.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binarylogic-resourcelogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson of Binary Logic
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-28 00:00:00 -07:00
12
+ date: 2009-07-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency