lib/activerecord_snapshot_view/snapshot_view.rb
# like new_version, but instead of an empty table you start with
# a copy of the previous version (if update=true)
like new_version, but instead of an empty table you start with
a copy of the previous version (if update=true)
like new_version but instead of an empty table you start with a copy of the previous version ( if update = true )
def updated_version(update=true, &block)
        new_version do
          if update
            sql = <<-EOF
              insert into #{working_table_name}
              select * from #{active_table_name}
            EOF
            connection.execute(sql)
          end
          block.call
        end
      end
def updated_version ( update = true , & block ) new_version do if update sql = <<-EOF 
              insert into  #{ working_table_name } 
              select * from  #{ active_table_name } EOF connection . execute ( sql ) end block . call end end
like new_version, but instead of an empty table you start with
a copy of the previous version (if update=true)
like new_version but instead of an empty table you start with a copy of the previous version ( if update = true )
update
block