app/models/piggybak/country.rb in piggybak-0.6.34 vs app/models/piggybak/country.rb in piggybak-0.7.0
- old
+ new
@@ -1,10 +1,9 @@
module Piggybak
class Country < ActiveRecord::Base
- attr_accessible :name, :abbr, :active_shipping, :active_billing
has_many :states
- scope :shipping, where(:active_shipping => true)
- scope :billing, where(:active_billing => true)
- default_scope :order => 'name ASC'
+ scope :shipping, -> { where(:active_shipping => true)}
+ scope :billing, -> { where(:active_billing => true)}
+ default_scope { order('name ASC') }
end
end