Skip to content

Commit 0630ff5

Browse files
Add scope and attr_readonly to dummy app for testing purposes
1 parent adfa58c commit 0630ff5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/dummy/app/models/user.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ class User < ApplicationRecord
44
before_create :foo, -> () {}
55
validates :name, presence: true
66
has_one :profile
7+
scope :adult, -> { where(age: 18..) }
8+
9+
attr_readonly :last_name
710

811
private
912

0 commit comments

Comments
 (0)