<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -75,6 +75,21 @@ Now say you just want to give your horse a whole different array of traits. Or h
   @horse.traits                   # =&gt; 4
   @horse.traits.to_a              # =&gt; [:fluffy] (value of &quot;smug&quot; was false, hence only :fluffy was set)
 
+== New instance methods
+
+Along with having traits, the @horse will not have specialized attributes for each trait.
+
+  @horse.traits_fluffy  # =&gt; true
+  @horse.traits_happy   # =&gt; false
+  
+This helps creating checkboxes for Horse model, as follows.
+
+  &lt;%= f.label :traits_fluffy, 'Fluffy' %&gt;
+  &lt;%= f.check_box :traits_fluffy %&gt;
+  
+  &lt;%= f.label :traits_happy, 'Happy' %&gt;
+  &lt;%= f.check_box :traits_happy %&gt;
+
 == Finding fluffy horse in the database
 
 Integer_fu provides an efficient and flexible way to find all matching horses in database. Here's how you find :happy AND :fluffy horses:</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,19 @@ module IntegerFu
           end
         end
         
+        for value_name in options[:values]
+          class_eval &lt;&lt;-ruby
+            def #{attr_name}_#{value_name}=(arg)
+              arg = (arg == &quot;0&quot; ? false : arg)
+              self.#{attr_name}[&quot;#{value_name}&quot;] = arg
+            end
+            
+            def #{attr_name}_#{value_name}
+              self.#{attr_name}[&quot;#{value_name}&quot;]
+            end
+          ruby
+        end
+        
         named_scope attr_name, proc { |*args| 
           args = helpers.symbolize(args.flatten)
           cumulative_value = helpers.array_to_integer_with_keys(options[:values], args)</diff>
      <filename>lib/integer_fu.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e8ef9135601cca77eb540b3f13374fc22c21029b</id>
    </parent>
  </parents>
  <author>
    <name>Maxim Chernyak</name>
    <email>max@bitsonnet.com</email>
  </author>
  <url>http://github.com/maxim/integer_fu/commit/194e7437febd0677cdd145be7f3d9090ca36a8da</url>
  <id>194e7437febd0677cdd145be7f3d9090ca36a8da</id>
  <committed-date>2009-04-30T09:01:18-07:00</committed-date>
  <authored-date>2009-04-30T09:01:18-07:00</authored-date>
  <message>Add auto-generated accessors for each mapped value to enable seamless check_box helper usage. Update README.</message>
  <tree>f028751b28dfa1136ae55b976a24481d68958f37</tree>
  <committer>
    <name>Maxim Chernyak</name>
    <email>max@bitsonnet.com</email>
  </committer>
</commit>
