RE: newbie - a few questions

  1. the table is based on pluralizing your model. Recipe = recipes table.
    This can all be configured through Active Record. As a beginner, I
    wouldn’t worry about it yet.

  2. InstantRails has a config file that can be modified. However, one
    thing at a time… Get comfortable writing rails apps using the built in
    server. Then go learn InstantRails… It’s not necessary to learn the
    language. Your rails application is going to determine the database you
    use, not InstantRails.

3.Yup. You should buy the “Agile Web D. with Rails” book. It
covers login very well and really answers a lot of beginner (and
advanced) questions. Plus you’re supporting the development of Rails (in
a way).

As for PDF, though I’ve not done it, I know it’s possible and there are
those on the list who have had much success with it/

  1. Validation is easy in Rails.

In your Recipe model (recipe.rb) add this line after the class
declaration: (between ‘class Recipe’ and ‘end’

 validates_presence_of :title

To validate the title field. There’s many other validators like
“validates_numericality_of” and others.

Since you’re doing JSP, you should be pretty comfortable with an API and
Rails has a great one at http://api.rubyonrails.com/

I hope this helps answer your questions. If you can remember that Rails
is much more than scaffolding and ‘magic’, you’ll start to love it and
you’ll be amazed every single day at what it can help you create.

Good luck!

-Brian H.

Thanks, for explaining, it sure helps.

I did order the book yesterday.

  1. the table is based on pluralizing your model. Recipe = recipes table.
    This seems it might cause me problems as some of my tables are named
    software, locations, employees.
  1. InstantRails has a config file that can be modified. However, one
    I already have Instant Rails installed at work, but use a Mac at Home.
    Are you saying I should not use this now?

Regards,

Frank R.
[email protected]

Hi, Frank,

than set_table_name “[your table name]” will be your friend. Have a look
at: Peak Obsession

regards
Jan

Frank R. wrote:

I already have Instant Rails installed at work, but use a Mac at Home.
Are you saying I should not use this now?

For your Mac, use Locomotive [1] (free) and TextMate [2] (very
affordable - 39 euros). See the movie [3] of the combination in action.
(The movie shows an older version of Locomotive, but should be
convincing.)

regards

Justin

[1] http://locomotive.sourceforge.net/
[2] http://www.macromates.com/
[3] http://locomotive.sourceforge.net/images/locomotive_intro.mov