view test/exemplars/changeset_exemplar.rb @ 755:bde9c5bfb559 feature_14

created a new instance variable to be able to filter the projects: @filtered_projects. New projects index layout; new partials for projects index.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 11 Nov 2011 15:57:58 +0000
parents 513646585e45
children cbb26bc654de
line wrap: on
line source
class Changeset < ActiveRecord::Base
  generator_for :revision, :method => :next_revision
  generator_for :committed_on => Date.today
  generator_for :repository, :method => :generate_repository

  def self.next_revision
    @last_revision ||= '1'
    @last_revision.succ!
    @last_revision
  end

  def self.generate_repository
    Repository::Subversion.generate!
  end
end