I’m preety new at RoR (and programming), I tried a few tutorials, and
really like the RoR simplicity, but my knowledge of the framework still
isn’t very good (to be true, i understand the basics, but not everything
that’s in the tutorials).
But still I’d like to create a website which has:
front end interface (with no edit functions)
admin interface (with edit functions for articles, pictures, etc, …)
I’m interested if there are any similar systems “on the market”, any
tutorials, or any hints for a total n00b
Most any Rails tutorial will cover scaffolding. This provides all
your CRUD operations. To prevent users from doing anything other than
viewing the items, you can just use some authentication and protect
the admin actions. Look into the login_generator, instructions are on
the wiki. So basic steps are
Create Rails app
Create database and table for your model
Generate scaffolding for your model
Install login_generator and protect your controller, except for the
list/show actions
There are many other authentication systems, and you can write your
own of course, but if you just want to quickly put up a site to do
that, those are the steps you need to take to just get started
learning.
I would recommend you look at the login_engine, over the direct
login_generator. For someone starting out I found the login_engine
pretty
easy to implement. Not to say you shouldn’t look at them both, but I
found
the login_engine and the associated tutorial videos to be extremely
helpful.
Basicly what I want to do is that Pat M.'s #4, but just can’t
understand how to disable edit functions …
For examlpe: the part of the code: (<%= link_to ‘Edit’, :action =>
‘edit’, :id => post %>) has to be invisible to unregistered users. But
how to do it … that’s a big problem in my designer brain
I would recommend you look at the login_engine, over the direct
login_generator. For someone starting out I found the login_engine pretty
easy to implement. Not to say you shouldn’t look at them both, but I found
the login_engine and the associated tutorial videos to be extremely helpful.
If you follow along with the tutorial in DHH’s Rails book, it goes about
doing just this. It uses two controllers to provide the admin & end-user
functionality separation.