lib/forge/app/models/dispatch_link.rb in forge-cli-0.0.18 vs lib/forge/app/models/dispatch_link.rb in forge-cli-0.1.0
- old
+ new
@@ -1,12 +1,15 @@
class DispatchLink < ActiveRecord::Base
# Relationships
belongs_to :dispatch, :foreign_key => :dispatch_id
has_many :clicks, :class_name => "DispatchLinkClick"
- default_scope :order => "clicks_count DESC"
+ default_scope { order("clicks_count DESC") }
# Validations
# validates_presence_of :uri
# validates_presence_of :dispatch
# validates_uniqueness_of :position, :scope => :dispatch_id
+ # open up everything for mass assignment
+ attr_protected
+
end