thoughtbot/active-record-recipes

Remove default value from Recipe.with_description

Closed this issue · 0 comments

scope :with_description, ->(string = "") {
joins(:rich_text_description).where("body LIKE ?", "%#{string}%")
}

Make sure to see what happens if no value is passed.