easy_dates 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/Rakefile +1 -1
- data/easy_dates.gemspec +2 -2
- data/lib/easy_dates/base.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -37,7 +37,7 @@ Once your dates have been defined you can access the new formatted date as follo
|
|
37
37
|
@user = User.first
|
38
38
|
|
39
39
|
# Example 1 / format_for :updated_at, :signup_date, :test_date
|
40
|
-
@user.
|
40
|
+
@user.formatted_updated_at
|
41
41
|
@user.formatted_signup_date
|
42
42
|
@user.formatted_test_date
|
43
43
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('easy_dates', '0.1.
|
5
|
+
Echoe.new('easy_dates', '0.1.1') do |p|
|
6
6
|
p.description = "Easy date formatting for ActiveRecord"
|
7
7
|
p.url = "http://github.com/platform45/easy_dates"
|
8
8
|
p.author = "Ryan Oberholzer"
|
data/easy_dates.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{easy_dates}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ryan Oberholzer"]
|
9
|
-
s.date = %q{2010-01-
|
9
|
+
s.date = %q{2010-01-08}
|
10
10
|
s.description = %q{Easy date formatting for ActiveRecord}
|
11
11
|
s.email = %q{ryan@platform45.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/easy_dates.rb", "lib/easy_dates/base.rb"]
|
data/lib/easy_dates/base.rb
CHANGED
@@ -23,7 +23,7 @@ module EasyDates
|
|
23
23
|
end
|
24
24
|
|
25
25
|
names.each do |name|
|
26
|
-
chosen_name = names.
|
26
|
+
chosen_name = names.size == 1 ? (options[:as] || "formatted_#{name}") : "formatted_#{name}"
|
27
27
|
generate_method(name, chosen_name, format) unless name.equal?(:timestamps)
|
28
28
|
end
|
29
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_dates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Oberholzer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-08 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|