ruby on rails - follow and following with status -


i'm working on follow , following functionality of article https://www.railstutorial.org/book/following_users

it's working fine added column name status boolean present follow request has been accepted. current_user.following return relations of current_user need users relationship status true. code totally same mention article , added status column in relationship table. kindly me

i don't know original code, intuitively should work

current_user.following.where(status: true) 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -