Skip to content

Commit 96a8da2

Browse files
committed
Add attr_accessor to model classes
1 parent 440e7f0 commit 96a8da2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/dummy/app/models/post.rb

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class Post < ActiveRecord::Base
2424

2525
before_create :set_id
2626

27+
attr_accessor :title, :views
28+
2729
private
2830

2931
def set_id

0 commit comments

Comments
 (0)