Skip to content

Commit

Permalink
fixed bug where Translation was not included but t() was being used
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhunter authored and seancribbs committed Aug 25, 2010
1 parent bf73ef6 commit 9b769ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ripple/lib/ripple/attribute_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Ripple
# Makes ActiveRecord-like attribute accessors based on your
# {Document}'s properties.
module AttributeMethods
include Translation
extend ActiveSupport::Concern
extend ActiveSupport::Autoload
include ActiveModel::AttributeMethods
Expand Down
5 changes: 5 additions & 0 deletions ripple/spec/ripple/attribute_methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,9 @@
@widget = Widget.new { |w| w.key = 'some-key' }
@widget.key.should == 'some-key'
end

it "should raise an argument error when assigning a non hash to attributes" do
@widget = Widget.new
lambda { @widget.attributes = nil }.should raise_error(ArgumentError)
end
end

0 comments on commit 9b769ca

Please sign in to comment.