mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
This model is a model so it should behaves like one
This commit is contained in:
parent
c24c9def36
commit
be6ff39199
1 changed files with 3 additions and 7 deletions
|
@ -88,18 +88,14 @@ module ApplicationTests
|
|||
@plugin.write "app/models/blog/post.rb", <<-RUBY
|
||||
module Blog
|
||||
class Post
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Model
|
||||
|
||||
def id
|
||||
44
|
||||
end
|
||||
|
||||
def to_param
|
||||
id.to_s
|
||||
end
|
||||
|
||||
def new_record?
|
||||
false
|
||||
def persisted?
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue