Answer the question
In order to leave comments, you need to log in
How to make a request in Rails for a selection of materials that have a lot of text?
There is a model that has a text field. How to correctly get all models for which this field contains more text than, for example, 100 characters?
I imagine it something like this (but it's wrong):$reviews = Review.where(text > 100).all
Answer the question
In order to leave comments, you need to log in
something like this
dev.mysql.com/doc/refman/5.7/en/string-functions.h...$reviews = Review.where("LENGTH(text) > 100").all
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question