hash_accessor 1.0.0 → 1.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,8 +1,10 @@
1
1
  = HashAccessor
2
2
 
3
- This gem provides accessor methods to hash keys.
3
+ This gem provides accessor methods to hash keys with enough intelligence to make them useful!
4
4
 
5
- The purpose behind building HashAccessor was to be able to quickly add/modify/remove variables being stored in a serialized hash of a rails model. This is very useful if you have a large list of often changing variables on a model which don't get queried against. You can create new variables without messing up your DB. Storing account configurations or custom themes is a common scenario.
5
+ The purpose behind building HashAccessor was to be able to quickly add/modify/remove variables being stored in a serialized hash of a rails model. This is very useful if you have a large list of often changing variables on a model which don't get queried against. You can create new variables without messing up your DB. Storing account configurations or custom themes is a common scenario.
6
+
7
+ This gem was designed to have HTML forms update directly to the hash, but maintain the correct class (respecting :attr_accessible of course). Options like :default, :type, and :collects are particularly helpful when dealing with forms.
6
8
 
7
9
  == Installation
8
10
 
@@ -50,7 +52,7 @@ Here is an example:
50
52
  ==== For Arrays only:
51
53
  <code>:collects</code> - only runs on arrays. Calls the lambda method on each item in the array before saving
52
54
 
53
- <code>:reject_blanks</code> - removes all blank elements after the collect method
55
+ <code>:reject_blanks</code> - removes all blank elements after the collect method. This with :collects can be used together for storing a list of ids stored as checkboxes in a form.
54
56
 
55
57
 
56
58
 
data/lib/hash_accessor.rb CHANGED
@@ -4,7 +4,7 @@ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname
4
4
  require 'hash_accessor/railtie' if defined?(Rails)
5
5
 
6
6
  module HashAccessor
7
- VERSION = "1.0.0"
7
+ VERSION = "1.0.1"
8
8
 
9
9
  autoload :ClassMethods, 'hash_accessor/class_methods'
10
10
 
data/rails/init.rb CHANGED
@@ -1,2 +1,2 @@
1
- require File.expand_path('/../lib/hash_accessor', File.dirname(__FILE__))
1
+ require File.expand_path('../lib/hash_accessor', File.dirname(__FILE__))
2
2
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_accessor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-16 00:00:00.000000000Z
12
+ date: 2011-11-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &2157566220 !ruby/object:Gem::Requirement
16
+ requirement: &2158712380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157566220
24
+ version_requirements: *2158712380
25
25
  description: This gem provides accessor methods to hash keys.
26
26
  email:
27
27
  - development@forrestzeisler.com