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
arjun menon
903 Pointsrails app modify feed display, login/signup page and json format issue?
hey
i am trying to modify d ruby on rails application so that when a user visits d homepage it shows d login and sign up form as u hv in twitter and facebook. when i put a condition like <% if user_signed_in? %> in statuses index page and also in application layout page, and do some trick as specified in devise's github page:
i can still access d feed page from url. how m i suppose to restrict it based on whether user is signed in or not. pls note rest of d pages like - create new status can't be accesed if not signed in. dat works but not for d feed page.
and, one more thing, how do u keep d feed relevant to a user according to der friend list and not everyone's as it is in d application now.
and der is also dis problem dat if u type feed.json or createstatus.json or ny other page with d format .json from url, u can see d content even if u r not signed in.
ur help will b highly appreciated.
2 Answers
arjun menon
903 Pointsyup exactly dat is hw u chk. if u try for urself accessing d page with .json u can decipher all d content posted by d user even if u r not signed in
Chad Shores
Courses Plus Student 8,868 PointsTry using a question mark like this user_signed_in?