lib/memento/session.rb in memento-0.4.2 vs lib/memento/session.rb in memento-0.4.3
- old
+ new
@@ -1,12 +1,13 @@
module Memento
class Session < ActiveRecord::Base
self.table_name = "memento_sessions"
- has_many :states, :class_name => "Memento::State", :dependent => :delete_all, :order => "id DESC"
+ has_many :states, -> { order "id DESC" },
+ :class_name => "Memento::State", :dependent => :delete_all
belongs_to :user
- attr_accessible nil
+ # attr_accessible nil
validates_presence_of :user
def add_state(action_type, record)
states.store(action_type, record)
\ No newline at end of file