lib/memento/session.rb in memento-0.3.1 vs lib/memento/session.rb in memento-0.3.2
- old
+ new
@@ -1,8 +1,8 @@
class Memento::Session < ActiveRecord::Base
set_table_name "memento_sessions"
- has_many :states, :class_name => "Memento::State", :dependent => :delete_all
+ has_many :states, :class_name => "Memento::State", :dependent => :delete_all, :order => "id DESC"
belongs_to :user
validates_presence_of :user
def add_state(action_type, record)
states.store(action_type, record)
\ No newline at end of file