Ruby On Rails Classroom image

Anil  Bist / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3 | 4|Last
Lessons:- A First Feed Implementation

Here the followed_user_ids method is synthesized by Active Record based on the has_many :followed_users association (Listing 11.10); the result is that we need only append _ids to the association name to get the ids corresponding to the user.followed_users collection. A string of followed user ids then appears as follows:

 

When inserting into an SQL string, though, you don’t need to do this; the ? interpolation takes care of it for you (and in fact eliminates some database-dependent incompatibilities). This means we can use

 

will involve a class method in the Micropost class (a construction mentioned briefly in Section 4.4.1). A proposed implementation along these lines appears in Listing 11.43.

 
 
 
image
Anil  Bist

Skills    Ruby On Rails

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)