Forum: Ruby on Rails RE: newbie - a few questions

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
60e38de043848f82392062088f191213?d=identicon&s=25 HOGANBP (Guest)
on 2005-12-01 17:30
(Received via mailing list)
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 Development 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/

4. 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 Hogan
998baab37c607466125c1235c1ad7006?d=identicon&s=25 Frank Rocco (frocco)
on 2005-12-01 17:46
(Received via mailing list)
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.

>2. 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 Rocco
farocco@hotmail.com
E48d29dc8fedb2878fa518d41cc63d88?d=identicon&s=25 JanPrill (Guest)
on 2005-12-01 18:07
(Received via mailing list)
Hi, Frank,

than set_table_name "[your table name]" will be your friend. Have a look
at: http://wiki.rubyonrails.com/rails/pages/HowToUseLe...

regards
Jan
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 justin (Guest)
on 2005-12-02 02:42
(Received via mailing list)
Frank Rocco 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/locomotiv...
This topic is locked and can not be replied to.