DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR RUBY
rails scopes
class Book < ApplicationRecord scope :costs_more_than, ->(amount) { where("price > ?", amount) } end
Source by guides.rubyonrails.org #
PREVIOUS
NEXT
Tagged:
#rails
#scopes
ADD COMMENT
Topic
COMMENT
Name
1+3 =
Submit