time_accessor 0.0.1 → 0.0.2
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.
- data/README.rdoc +9 -10
- data/lib/time_accessor/version.rb +1 -1
- metadata +9 -22
data/README.rdoc
CHANGED
@@ -2,20 +2,19 @@
|
|
2
2
|
Time Accessor is a Rails plugin that adds a time_accessor method to ActiveRecord::Base. The method helps to setup attribute accessors that behave like Time objects and can be set using multiparameters.
|
3
3
|
|
4
4
|
= Install
|
5
|
-
|
5
|
+
Add it to your Gemfile:
|
6
|
+
gem 'time_accessor'
|
6
7
|
|
7
8
|
= Usage
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
9
|
+
Use the time_accessor method in your model:
|
10
|
+
class User < ActiveRecord::Base
|
11
|
+
time_accessor :time
|
12
|
+
end
|
14
13
|
|
15
14
|
Then set your 'time' attribute with multiparameters:
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
user = User.new({"time(1i)" => 2012, "time(2i)" => 01, "time(3i)" => 21})
|
17
|
+
user.time # => 2012-01-21 00:00:00 UTC
|
19
18
|
|
20
|
-
|
19
|
+
= License
|
21
20
|
This project rocks and uses MIT-LICENSE.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_accessor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rails
|
16
|
-
requirement: &2153031420 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2.0
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *2153031420
|
25
14
|
- !ruby/object:Gem::Dependency
|
26
15
|
name: sqlite3
|
27
|
-
requirement: &
|
16
|
+
requirement: &2156926740 !ruby/object:Gem::Requirement
|
28
17
|
none: false
|
29
18
|
requirements:
|
30
19
|
- - ! '>='
|
@@ -32,11 +21,9 @@ dependencies:
|
|
32
21
|
version: '0'
|
33
22
|
type: :development
|
34
23
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
description:
|
37
|
-
that
|
38
|
-
order to work seamlessly with rails form helpers). Being unable to find a solution
|
39
|
-
that satisfied me, I rolled my own.
|
24
|
+
version_requirements: *2156926740
|
25
|
+
description: Adds a time_accessor method to ActiveRecord::Base to create time attributes
|
26
|
+
that accept multiparameter attributes.
|
40
27
|
email:
|
41
28
|
- gabeodess@gmail.com
|
42
29
|
executables: []
|
@@ -103,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
90
|
version: '0'
|
104
91
|
segments:
|
105
92
|
- 0
|
106
|
-
hash:
|
93
|
+
hash: 111979724619139288
|
107
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
95
|
none: false
|
109
96
|
requirements:
|
@@ -112,14 +99,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
99
|
version: '0'
|
113
100
|
segments:
|
114
101
|
- 0
|
115
|
-
hash:
|
102
|
+
hash: 111979724619139288
|
116
103
|
requirements: []
|
117
104
|
rubyforge_project:
|
118
105
|
rubygems_version: 1.8.15
|
119
106
|
signing_key:
|
120
107
|
specification_version: 3
|
121
108
|
summary: Adds a time_accessor method to ActiveRecord::Base to create time attributes
|
122
|
-
that
|
109
|
+
that accept multiparameter attributes.
|
123
110
|
test_files:
|
124
111
|
- test/dummy/app/assets/javascripts/application.js
|
125
112
|
- test/dummy/app/assets/stylesheets/application.css
|