Skip to content

Commit

Permalink
Make compatible with Rails 4
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbertram committed Jul 13, 2013
1 parent 350da6c commit 790eb63
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
if self._accessible_attributes?
attr_accessible *price_fields
end
end

end
end

Expand Down

0 comments on commit 790eb63

Please sign in to comment.