rawgento_models 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/rawgento_models/order_item.rb +7 -0
- data/lib/rawgento_models/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2cac8cda199d168bfd4c243a1f17eae175ed94
|
4
|
+
data.tar.gz: da7c513d2abb780e5f353356926ec198f51c4830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb366b28a869e2c1f6bf3ca09cf186839dc9080a5f6d1d0947e8530a5197c5dcecca28855202c918c0771245e3278b5c6b867a36637f99691fa1fe1d54c4a37c
|
7
|
+
data.tar.gz: d6a3d82662261e66458bd6cd2f79245e94cafe53ed5cd37665c40979ea909b59539963859ba821390426e3be905ac26f759d89bdb23975f39d9535da7f42d46e
|
data/README.md
CHANGED
@@ -68,6 +68,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
68
68
|
|
69
69
|
Its easiest to copy an existing migration (from db/migrate), adjust the timestamp in the file name and replace the actual migration code.
|
70
70
|
|
71
|
+
According to [](Active Record Migrations) you can also run `rake "db:new_migration[CreateUser, name birth:date]"` or `rake db:new_migration name=CreateUser options="name birth:date"`, you'll get help from `rake db:new_migration`.
|
72
|
+
|
71
73
|
## Contributing
|
72
74
|
|
73
75
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rawgento_models. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -42,5 +42,12 @@ module RawgentoModels
|
|
42
42
|
updated_at: time_range })
|
43
43
|
.order("updated_at ASC")
|
44
44
|
end
|
45
|
+
|
46
|
+
def order_item_same_product_last_wished
|
47
|
+
OrderItem.where(local_product_id: self.local_product_id).where('num_wished >= 0')
|
48
|
+
.joins(:order).where(
|
49
|
+
orders: { state: ['ordered', 'stocked']})
|
50
|
+
.order("updated_at DESC").first
|
51
|
+
end
|
45
52
|
end
|
46
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rawgento_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Wolfsteller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.4.8
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: ActiveRecord Models to use with specific Magento shops
|