Forum: Ruby on Rails Links for authenticated users on public pages.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adrian (Guest)
on 2006-04-05 02:36
I made an authentication system and I'm uncertain of the best way to go
about hiding links on public pages meant for authenticated users  (this
is also different for people with various privledges but this isn't the
problem).

I only know two ways to go about this: create a helper file and write a
seperate authorization piece that verifies the user to show the URL and
add the method to the links in the view page; or create a controller for
the links where they're verified there by the system that I have already
set-up which would only involve one line of code to cover all of them as
opposed to 2-3 in the helper and having to add a method to all the links
in the views.

This is for a messageboard where there are things like delete topic and
edit post shown on public pages.

Any suggestions or tips would be appreciated.
This topic is locked and can not be replied to.