has_accounts 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,7 @@ class Account < ActiveRecord::Base
53
53
  def turnover(selector = Date.today, inclusive = true)
54
54
  equality = "=" if inclusive
55
55
 
56
- if selector.is_a? Range or selector.is_a? Array
56
+ if selector.respond_to(:first) and selector.respond_to(:last)
57
57
  if selector.first.is_a? Booking
58
58
  if selector.first.value_date == selector.last.value_date
59
59
  condition = ["date(value_date) = :value_date AND id >#{equality} :first_id AND id <#{equality} :last_id", {
@@ -1,3 +1,3 @@
1
1
  module HasAccounts
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_accounts
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
5
- prerelease: false
4
+ hash: 57
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-27 00:00:00 +02:00
18
+ date: 2011-08-01 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements: []
75
75
 
76
76
  rubyforge_project:
77
- rubygems_version: 1.3.7
77
+ rubygems_version: 1.5.2
78
78
  signing_key:
79
79
  specification_version: 3
80
80
  summary: HasAccounts provides models for financial accounting.