Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

how to write a scope in rails

scope :proponent,   ->(user){ where(user_id: user.id) }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #write #scope #rails
ADD COMMENT
Topic
Name
3+8 =