Introduce fake_models.rb to avoid platform-specific code. [mpalmer] Closes #8714

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Michael Koziarski 2007-07-17 09:44:03 +00:00
parent 872c5f4380
commit b549366216
3 changed files with 7 additions and 10 deletions

@ -0,0 +1,5 @@
class Customer < Struct.new(:name, :id)
def to_param
id.to_s
end
end

@ -1,10 +1,5 @@
require File.dirname(__FILE__) + '/../abstract_unit'
class Customer < Struct.new(:name, :id)
def to_param
id.to_s
end
end
require File.dirname(__FILE__) + '/fake_models'
class CustomersController < ActionController::Base
end

@ -1,8 +1,5 @@
require File.dirname(__FILE__) + '/../abstract_unit'
unless defined?(Customer)
Customer = Struct.new("Customer", :name)
end
require File.dirname(__FILE__) + '/fake_models'
module Fun
class GamesController < ActionController::Base