Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
pradeepghimire
Full Stack JavaScript Techdegree Student 2,165 PointsHow to Implement Subscription feature.
I have User, Book and Subscription Models
User
has_many subscriptions has_many books through subscription
Book
has_many subscriptions has_many users through subscription
Subscription
belongs_to user belongs_to book
Now, User can go to books index where list of all books is displayed and user want to subscribe some books of their interest more like adding to favourites.ns
How can I implement the subscription methods with these features ?
Subscription#index
showing only current users subscriptions clicking a book on subscriptions should open the origin book can delete books from subscription no duplicate books on subscription#index