I would like to have a simple intranet with categories and articles
management. I think to use act_as_tree for the categories and
act_as_list for the articles, but any article should be connected to
one category. So in any category I can have one or more articles in a
list. Do I have to declare a Category class as parent of the list of
the articles? As you might guess I am a Ruby and Rails rookie.
I would like to know if there is a plug-in with this features, where I
can manage categories and articles.
Apologies if you have already done this but I recommend newcommers to
look at the rails guides at http://guides.rubyonrails.org/
particularly Getting Started and ActiveRecord Associations. These may
answer some of your questions.
Are you sure you need a _list_ of articles as opposed to just a
collection of them such as would be provided by the normal has_many,
belongs_to relationship?
> This is my first message, so hello to everybody!
> I would like to have a simple intranet with categories and articles
> management. I think to use act_as_tree for the categories and
> act_as_list for the articles, but any article should be connected to
> one category. So in any category I can have one or more articles in a
> list. Do I have to declare a Category class as parent of the list of
> the articles? As you might guess I am a Ruby and Rails rookie.
> I would like to know if there is a plug-in with this features, where I
> can manage categories and articles.
Apologies if you have already done this but I recommend newcommers to
look at the rails guides athttp://guides.rubyonrails.org/
particularly Getting Started and ActiveRecord Associations. These may
answer some of your questions.
I had a look and I wll start soon to read migrations and ActiveRecord
chapters in "Agile Web Development in Rails"
Are you sure you need a _list_ of articles as opposed to just a
collection of them such as would be provided by the normal has_many,
belongs_to relationship?
Let's say you have some articles and the administrator wants to order
the articles display. Showing the articles using act_as_list is
perfect, since I want to show the articles as and ordered list.
If the articles have a definite intrinsic sequence that is not
determined by date or other property of the article then acts_as_list
may indeed be appropriate. Note that acts_as_list is about how the
data is stored in the database rather than just an order of viewing at
some instant.