Topic: newbie looking for help

Hi,first sorry for my pretty poor english.

I just discover Ror and i'm already hooked.I setup the local environement on my Deb and start to training.I made the hello world and a guest book app and it was so fast.

Now I want to try to implement a classified ads application, that allows users to signin, leave an ad with one or two images and few more informations (name, phone, email, a comment on the object, etc...) and that make the user account and his ad displaying available  for x days.

My prob is that the start is a bit to abstract ( the framework possibilities are so wide).

questions are:-wich models (how much db table)i have to create?
             -wich controllers?
             -Do i have to use plugins, generators..?

I know it's a blurr (it's a real beginner inquiries) but if someone could give me a starting point it would be nifty for me and start to work on it.

regards...

Re: newbie looking for help

When deciding on the models, it helps to write down a description of the application and pick out the nouns. I see these three (followed by the columns/attributes)

User (name, email, phone, etc.)
Ad (user_id, name, content)
Image (ad_id, path)

You could set up the associations like this:

class User < ActiveRecord::Base
  has_many :ads
end

class Ad < ActiveRecord::Base
  belongs_to :user
  has_many :images
end

class Image < ActiveRecord::Base
  belongs_to :ad
end


You may want to skip the images part for now and get the rest of the application working. You can then work on adding images. I would create a UsersController and an AdsController. You can create basic CRUD operations (create, read, update, destroy - similar to scaffolding) in these two controllers to handle pretty much everything. You'll also need to manage user login/logout. You may want to put this in the Users controller or create a separate controller for it.

If you want a premade plugin to handle user authentication for you, look into acts_as_authenticated. There are other generators/plugins as well, but that one works pretty well.

Railscasts - Free Ruby on Rails Screencasts

Re: newbie looking for help

Hi, thanks a lot. I have to start to work on this and look what happens.I'll certainly be back soon on this thread.
Regards...