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
Chase Lee
29,275 PointsAdvanced Social Features in Ruby on Rails > Uploading Files > Building Associations Code Challenge
Hi everyone,
I am doing the "Building Associations" code challenge in "Advanced Social Features in Ruby on Rails" and ran into a problem.
The question is "Initialize the document association on the status instance variable."
Here is the code:
class StatusesController < ApplicationController
def new
@status = Status.new
# Write your code here
end
end
I have no idea what to do. I have tried multiple things. Based on what I know of on past knowledge, I think that I should have something like this:
@status.something.and_possibly_something_else
1 Answer
Dario Hunt
2,245 PointsYou're looking for:
@status.build_document