has_accounts 3.0.0.beta0 → 3.0.0.beta1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7536557b72ba28c4867b5e4397b03f8a06d5dfb3
4
- data.tar.gz: b73be36ba1905821003318b7a836700c5343538a
3
+ metadata.gz: e8806313d5c398494b0e1b60afe3a17ff4668dac
4
+ data.tar.gz: 6eedb23cab48c97e30091ad035ad5ac7b2750e6a
5
5
  SHA512:
6
- metadata.gz: 56d71c0b21006327dcbf25351c3c7ae7d11fba23afaa254138ef45f0a3b064c4d07b9bd33772bb7fc7054e273175afbc013e24e3a69a9dac1baffbf27fd82a9b
7
- data.tar.gz: 3379c6d6c3f491728d922247d999f8576366b0295d45cef037db6ff6a6d06c42257e979e95178bda3ef9180e081068c477871d4a1a89b314342b2b03a6713361
6
+ metadata.gz: 6dcac2203c5128d8e3f342f7e5f75754d02c16b637a0353d8de1302991b32db46dddbc16ab54ec773cbf8a6713836ff95f36fe99bb11105115e1d9a72a2925e7
7
+ data.tar.gz: 78c214b9b67659bbc56aed363b6c4d4e0c87ad9d785d16acd29b12a0737e5c493d6b92896626bd81998f19b11d8bdbc464605a1f396983ca15950e881518b424
@@ -7,7 +7,7 @@ class Account < ActiveRecord::Base
7
7
  default_scope order: 'code'
8
8
 
9
9
  # Dummy scope to make scoped_by happy
10
- scope :by_value_period, scoped
10
+ scope :by_date, scoped
11
11
 
12
12
  # Validation
13
13
  validates_presence_of :code, :title
@@ -66,15 +66,6 @@ class Booking < ActiveRecord::Base
66
66
  # Scoping
67
67
  default_scope order('value_date, id')
68
68
 
69
- scope :by_value_date, lambda { |value_date| where('date(value_date) = ?', value_date) }
70
- scope :by_value_period, lambda {|from, to|
71
- if from.present?
72
- where('date(value_date) BETWEEN :from AND :to', from: from, to: to)
73
- else
74
- where('date(value_date) <= :to', to: to)
75
- end
76
- }
77
-
78
69
  # Scope filter for date range
79
70
  scope :by_date_period, lambda {|date_from, date_to|
80
71
  if date_from.present? && date_to.present?
@@ -1,3 +1,3 @@
1
1
  module HasAccounts
2
- VERSION = '3.0.0.beta0'
2
+ VERSION = '3.0.0.beta1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta0
4
+ version: 3.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Hürlimann (CyT)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -89,9 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: 1.3.1
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.2.2
92
+ rubygems_version: 2.4.5
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: HasAccounts provides models for financial accounting.
96
96
  test_files: []
97
- has_rdoc: