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
Andrew Heil
1,836 PointsEdit a Status
In the build social features / build a simple ruby on rails application we never got rid of "edit status"
We need to change this to be shown only when the status owner is the same as the current logged in user.
Can we guide each other in making sure we do the right thing here?
1 Answer
Jason Seifer
Treehouse Guest TeacherHey Andrew, Try the following:
<% if current_user && current_user == status.user %>
<%= link_to "Edit status", edit_status_path(status) %>
<% end %>