Skip to content

Commit

Permalink
Add attr_accessor to model classes
Browse files Browse the repository at this point in the history
  • Loading branch information
hammerhead committed Nov 30, 2022
1 parent 440e7f0 commit 96a8da2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/dummy/app/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class Post < ActiveRecord::Base

before_create :set_id

attr_accessor :title, :views

private

def set_id
Expand Down

0 comments on commit 96a8da2

Please sign in to comment.