padrino-helpers 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -156,7 +156,7 @@ module Padrino
156
156
 
157
157
  # Returns the class type for the given object
158
158
  def object_class(explicit_object)
159
- explicit_object.is_a?(Symbol) ? explicit_object.to_s.classify.constantize : explicit_object.class
159
+ explicit_object.is_a?(Symbol) ? explicit_object.to_s.camelize.constantize : explicit_object.class
160
160
  end
161
161
  end # AbstractFormBuilder
162
162
  end # FormBuilder
@@ -171,8 +171,8 @@ module Padrino
171
171
  def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
172
172
  from_time = from_time.to_time if from_time.respond_to?(:to_time)
173
173
  to_time = to_time.to_time if to_time.respond_to?(:to_time)
174
- distance_in_minutes = (((to_time - from_time).abs)/60).round
175
- distance_in_seconds = ((to_time - from_time).abs).round
174
+ distance_in_minutes = (((to_time.to_i - from_time.to_i).abs)/60).round
175
+ distance_in_seconds = ((to_time.to_i - from_time.to_i).abs).round
176
176
 
177
177
  I18n.with_options :locale => options[:locale], :scope => :'datetime.distance_in_words' do |locale|
178
178
  case distance_in_minutes
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 39
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 13
10
- version: 0.9.13
9
+ - 14
10
+ version: 0.9.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Padrino Team
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-06-19 00:00:00 +02:00
21
+ date: 2010-06-30 00:00:00 -07:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - "="
29
29
  - !ruby/object:Gem::Version
30
- hash: 33
30
+ hash: 39
31
31
  segments:
32
32
  - 0
33
33
  - 9
34
- - 13
35
- version: 0.9.13
34
+ - 14
35
+ version: 0.9.14
36
36
  type: :runtime
37
37
  name: padrino-core
38
38
  prerelease: false