Ruby On Rails Classroom image

Pooja  Negi / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3|Last
Lessons:-Using form for

(The -e here arranges to run just theexamples whose description strings match "signup page". Note in particular that this is not the substring "signup", which would run all the test in Listing 7.16.) To get these tests to pass again and to get our form to render, we must define an @user variable in the controller action corresponding to new.html.erb, i.e., the new action in the Users controller. The form_for helper expects @user to be a User object, and since we’re creating a new user we simply use User.new, as seen in Listing 7.18.

 

 

With the @user variable so defined, the test for the signup page should be passing again:

$  bundle  exec  rspec spec/requests/user pages spec.rb -e  "signup page"

 

At this point, the form (with the styling from Listing 7.19) appears as in Figure 7.12. Note the reuse of the box_sizing mixin from Listing 7.2. 

 
 
 
image
Pooja   Negi

Skills    Ruby On Rails

Qualifications :- High School - SSN high school, College/University - HNBGU, College/University - SRHU,
Location :-Ranipokhari,Rishikesh,Uttarakhand,India
Description:- Student
Explore
 

  Students (0)