Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:07:52+00:00 2026-06-14T17:07:52+00:00

I am building a social network in Ruby on rails. I am trying to

  • 0

I am building a social network in Ruby on rails. I am trying to add user_id to a users status but it produces an error. The code can be found at my github: https://github.com/lewisfrost/treebook.git

Can you please help? I have been stuck on this all day!!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:07:53+00:00Added an answer on June 14, 2026 at 5:07 pm

    In order to try to get the first_name and last_name of your user associated with your status, you can use the very handy & meaning method try !

    You could do something like this in your view:

    <strong><%= status.user.try(:first_name) %> <%= status.user.try(:last_name) %></strong>
    

    It will try to get the first_name of the user if it exists, and not raise an error if the user doesn’t exist!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a social-network like feature in an app I'm building, and
I'm following along with RailsSpace: Building a Social Networking Website with Ruby on Rails
Building a social network, I'm trying to fetch live notifications. Currently, the site sends
Hi I'm building a social networking / dating app where users can see who
I an building a kind of social network (think of it as last.fm, but
I´m building a social network with Grails and got stucked on giving users inner
I am looking for framework for building social networking site. Features: 1) Users can
I am building a server back-end for a mobile social network using Windows Azure.
I am working on a user based social network. I am building the site
i am building a social network platform, as a platform to learn web development.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.