Skip to content

Commit

Permalink
Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yolk committed Mar 3, 2009
1 parent 07ad8ec commit 67c07f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.textile
@@ -1,3 +1,7 @@
h3. biggs 0.1.1 - 2009-3-4

* Values can now be specified by an array of symbols.

h3. biggs 0.1.1 - 2009-3-3

* Refactored activerecord-adapter to include only basic setup method in ActiveRecord:Base
Expand Down
11 changes: 10 additions & 1 deletion README.textile
Expand Up @@ -59,7 +59,16 @@ You can customize the method-names biggs will use by passing in a hash of option
:street => Proc.new {|address| "#{address.street} #{address.house_number}" }
end

You can pass in a symbol to let biggs call a different method on your Address-model, or a Proc-object to create your data on the fly.
You can pass in a symbol to let biggs call a different method on your Address-model, or a Proc-object to create your data on the fly.

You can even pass in a array of symbols:

Address < ActiveRecord::Base
biggs :postal_address,
:recipient => [:company_name, :person_name]
end

This will call the methods company_name and person_name on your address-instance, remove any blank returned values and join the rest by a line break.

To access the formatted address string, simply call the provided method on an address instance:

Expand Down

0 comments on commit 67c07f9

Please sign in to comment.