I'm new to Ruby Rails and trying to follow along in the textbook, but my validation code isn't working. The original project was created by using the scaffold command:
rails generate scaffold Micropost content:text user_id:integer
Then the instructions tell me to add the following code to my Micropost model:
validates :content, length: { maximum: 140 }, presence: true
The validation works in that the form is not submitted if the length is longer than 140, but the problem is that there is no error message or anything. The button just does nothing. There is supposed to be a red error message, according to the textbook.
Any ideas?