Currently i'm using form_for read read a text_field called :comment, after the user submit it goes to the controller as such:
def create
@entry = Entry.new(entry_params)
if @entry.save
redirect_to :back
else
render 'new'
end
end
private
def entry_params
params.require(:entry).permit(:comment)
end
my question is whether I can search inside :comment (string) for a substring "test", when submitting?
Thanks