mirror of https://github.com/rails/rails
Removing unused fake models
This commit is contained in:
parent
353b88135f
commit
90c06717bc
|
@ -28,30 +28,6 @@ class Customer < Struct.new(:name, :id)
|
|||
end
|
||||
end
|
||||
|
||||
class ValidatedCustomer < Customer
|
||||
def errors
|
||||
if name =~ /Sikachu/i
|
||||
[]
|
||||
else
|
||||
[{:name => "is invalid"}]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Quiz
|
||||
class Question < Struct.new(:name, :id)
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
def persisted?
|
||||
id.present?
|
||||
end
|
||||
end
|
||||
|
||||
class Store < Question
|
||||
end
|
||||
end
|
||||
|
||||
class Post < Struct.new(:title, :author_name, :body, :secret, :persisted, :written_on, :cost)
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
@ -95,24 +71,3 @@ class Comment
|
|||
|
||||
attr_accessor :body
|
||||
end
|
||||
|
||||
module Blog
|
||||
def self.use_relative_model_naming?
|
||||
true
|
||||
end
|
||||
|
||||
class Post < Struct.new(:title, :id)
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
def persisted?
|
||||
id.present?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class RenderJsonTestException < Exception
|
||||
def as_json(options = nil)
|
||||
{ :error => self.class.name, :message => self.to_s }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue