This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Builders: as -> class

  • Loading branch information...
vinibaggio committed Mar 3, 2011
1 parent c2884e0 commit 544a99b5bc06e36da914c9e670d79a19285a7909
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/hermes/builders.rb
View
@@ -82,7 +82,7 @@ module Builders
@@builders = ActiveSupport::OrderedHash.new
def self.build(name, options={}, &block)
klass = options[:as] || name.to_s.classify.constantize
klass = options[:class] || name.to_s.classify.constantize
builder = if options[:like]
lambda { send(name.to_s.pluralize, options[:like]).attributes.merge(block.call) }
@@ -121,4 +121,4 @@ def method_missing(method, *args, &block)
end
end
ActiveSupport::TestCase.send :include, Hermes::Builders
ActiveSupport::TestCase.send :include, Hermes::Builders

0 comments on commit 544a99b

Please sign in to comment.