magentor 0.2.1 → 0.2.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 +1 -1
- data/lib/magento/order_item.rb +3 -2
- data/magentor.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/magento/order_item.rb
CHANGED
@@ -3,12 +3,13 @@ module Magento
|
|
3
3
|
class << self
|
4
4
|
def find_by_id(id)
|
5
5
|
Order.list.each do |order|
|
6
|
-
Order.find_by_increment_id(order.increment_id).order_items.select{ |i| i.id == id }
|
6
|
+
item = Order.find_by_increment_id(order.increment_id).order_items.select{ |i| i.id == id }
|
7
|
+
return item.first if item and item.first
|
7
8
|
end
|
8
9
|
end
|
9
10
|
|
10
11
|
def find_by_order_and_id(order_id, id)
|
11
|
-
Order.find_by_id(order_id).order_items.select{ |i| i.id == id }
|
12
|
+
Order.find_by_id(order_id).order_items.select{ |i| i.id == id }.first
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
data/magentor.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magentor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Preston Stuteville
|