Ruby On Rails Classroom image

prateek  darmwal / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  |1 | 2|Last
Lessons:- Content Validations

  Content Validations

Before leaving the Micropost model, we’ll add validations for the micropost content (following the example from Section 2.3.2). Like the user_id, the content attribute must be present, and it is further constrained to be no longer than 140 characters, making it an honest micropost. The tests generally follow the examples from the User model validation tests in Section 6.2, as shown in Listing 10.17.

 

As in Section 6.2, the code in Listing 10.17 uses string multiplication to test the micropost length validation:

 

 

 

 

 
 
 
image
prateek  darmwal

Skills    Ruby On Rails

Qualifications :- High School - S.K.M. Sn. Sec. School, Haldwani, College/University - Graphic Era Hill University, Bhimtal,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- I like to explore new technologies. I have skills in ruby on rails, php5, cakephp, jquery, javascript, html/css, java, c & c++. I love coding
Explore
 

  Students (0)