Hello,
I am currently doing an assignment with dynamic pages,
I have one dynamic page for rating courses, in which i had to restrict the comment box to 25 characters and also find a way to count the number of words input by the user giving a rating.
I have figured out how to restrict to 25 characters in my comment.rb file but i am completely lost how to capture the user input word count?
I assume its coding needed in my html.erb and controller file?
Thanks
What I have tried:
##code used for my character restriction
validates :comment, :presence => true, :length => {
:maximum => 25,
:too_long => ":Please limit your commentary to a maximum of %{count} characters, thank you."