created-and-updated-by 0.0.0 → 0.0.1

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 CHANGED
@@ -1,6 +1,21 @@
1
1
  = created-and-updated-by
2
2
 
3
- Description goes here.
3
+ This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magically with about 30 LOC
4
+
5
+ Create an initializer with CreatedAndUpdatedBy::Stamper.attach
6
+ This will automatically update created_by_id and updated_by_id by creating a belongs_to association and populating the fields with the values from User.current_user, you can change the Class or class_attribute that populates these fields using the optional params for attach: attach(model, attribute)
7
+
8
+ E.g, CreatedAndUpdatedBy::Stamper.attach(Account, :logged_in)
9
+
10
+ For classes the do not have a created_by_id or updated_by_id, the created_by and updated_by associations will return nil.
11
+
12
+ created-and-updated-by differentiates itself from others like it by attempting to be an extremely simple yet configurable implementation with about 30 LOC.
13
+
14
+ == Todo
15
+
16
+ * Clean things up a little more
17
+ * Add tests
18
+ * Check Rails 3.0 compatibility
4
19
 
5
20
  == Note on Patches/Pull Requests
6
21
 
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "created-and-updated-by"
8
8
  gem.summary = %Q{Preforms magic on created_by_id and updated_by_id fields}
9
- gem.description = %Q{This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magicly with about 30 LOC}
9
+ gem.description = %Q{This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magically with about 30 LOC}
10
10
  gem.email = "james@jamesdaniels.net"
11
11
  gem.homepage = "http://github.com/jamesdaniels/created-and-updated-by"
12
12
  gem.authors = ["James Daniels"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{created-and-updated-by}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Daniels"]
12
12
  s.date = %q{2010-01-18}
13
- s.description = %q{This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magicly with about 30 LOC}
13
+ s.description = %q{This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magically with about 30 LOC}
14
14
  s.email = %q{james@jamesdaniels.net}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: created-and-updated-by
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Daniels
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.2.9
24
24
  version:
25
- description: This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magicly with about 30 LOC
25
+ description: This gem extends ActiveRecord::Base causing created_by_id and updated_by_id attributes to be set magically with about 30 LOC
26
26
  email: james@jamesdaniels.net
27
27
  executables: []
28
28