Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

rendering issue

Rails • Asked by Matthew J Martin
OK, so I fairly new at rails, but i'm at the point where i feel confidence enough to start making my own side project which i decide would be a clone of facebook in rails. first i'm working on is getting status updates working. I got it setup as the StatusUpdate is a model that tobe called by the Pages controller to render on the index page, now the issue I'm having is I use form_for(@status_update) command I get 
undefined method `to_key' for #<StatusUpdate::ActiveRecord_Relation:0x00000000049d3448>
Did you mean?  to_set
if i use form_with(model: @status_update) 
undefined method `to_model' for #<StatusUpdate::ActiveRecord_Relation:0x000000000471cd80>
Did you mean?  to_xml
If i use form_with(model: status_update)

undefined local variable or method `status_update' for #<#<Class:0x0000000005801678>:0x0000000002ec8ec8>
Did you mean?  @status_update

I'm just getting a little fustrated with this.

What did you set `@status_update` to in your controller's action?

in my home page
def home
 @status_update =

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.