Skip to content

Commit

Permalink
Merge pull request #2 from nathanbertram/master
Browse files Browse the repository at this point in the history
Rails 4 Compatibility
  • Loading branch information
willcosgrove committed Jul 16, 2013
2 parents b56be11 + 9ec71fc commit af3db6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/priceable.rb
Expand Up @@ -17,9 +17,13 @@ def priceable(*price_fields)
send("#{price_field}#{suffix}=".to_sym, (new_price.to_f * 100).round)
end
end
if self._accessible_attributes?
attr_accessible *price_fields

unless Rails::VERSION::MAJOR == 4 && !defined?(ProtectedAttributes)
if self._accessible_attributes?
attr_accessible *price_fields
end
end

end
end

Expand Down

0 comments on commit af3db6c

Please sign in to comment.