Alright, I’ve been programming with Rails for a little while now, and I
really like what I see. I made a simple application for our clients
that
need to be able to view their personal and contact information, the
ports
they’re buying through our ISP, and communicate back and forth with us.
The thing is - the application is pretty messy because I have been hired
as
a new programmer (virtually NO programming experience, save slight
experience with PHP, C++, and HTML/CSS/JavaScript, and I do mean
slight experience)
and have had no formal training, so I’m having to learn everything by
myself
on the fly.
The application I wrote runs entirely off of one controller. The port
tracking, the communications and messaging, the login and sessions; all
of
it, one controller. From what I’ve read and seen about Rails, though,
this
is entirely not the way to do it. The application definitely works, but
I
don’t like how it’s done. I’m just glad my first really app works,
though!
I have another application I’m working on right now and I’m barely
getting
my feet wet with Ajax and I’ve recently discovered the joys of using
partials. I’m ready to create an authentication system for this
application, and I want some users to be able to access certain parts of
the
app and not others.
If I create a login controller, will the authentication and session
information carry over into other controllers? And what is the most
graceful way to have most actions inaccessible until authenticated,
without
having to include something like
redirect_to “/login/” if !session[:userID]
at the top of each action I want protected? (That’s how my first
application does it, and I don’t like it.)
Thanks,
David