title: Using rails code inside jquery
body: <p>I am new to Ruby on Rails, In my rails application, on change of checkboxes, the text-area is getting populated with the contact numbers separated by commas. I want to check the condition that if the message limit in the account is "n" than the contact number being populated in the text area should not exceed "n" and a proper alert should be shown.
  I tried to google it but could not find a way to have rails code inside jquery, to fetch the message limit from database and check the contact number being populated in the text-area has not exceed the message limit. Any help would be appreciable.</p>