My name is Igor. I am, probably, a bit newer then new, even though I program for 10+ years. I can program RPG(Mainframe), VB(Lotus Notes), some Delphi. I went through "ONLamp_com Rolling with Ruby on Rails/cookbok" tutorial and I made some kind of fancy rhtmls with very basic functions. My goal is to make a db, put on the web for the group where I belong and others (fly fishing). I am currently reading "Programming Ruby" book. One thing definetely screws up my sweet dreams: how to do validation? I know "if" and "else", but where to put them? in which folder? how to pop up or display message? Is the book I am reading is the proper book for me at this time? What would you suggest me to read? I appriciate your help. Happy Holidays. -- Posted via http://www.ruby-forum.com/.
On 12/13/05, Igor Zaretsky <izaret-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> My name is Igor. > > I am, probably, a bit newer then new, even though I program for 10+ > years. > I can program RPG(Mainframe), VB(Lotus Notes), some Delphi. > I went through "ONLamp_com Rolling with Ruby on Rails/cookbok" tutorial > and I made some kind of fancy rhtmls with very basic functions. > > My goal is to make a db, put on the web for the group where I belong and > others (fly fishing). > > I am currently reading "Programming Ruby" book. > > One thing definetely screws up my sweet dreams: how to do validation? > I know "if" and "else", but > where to put them? > in which folder? > how to pop up or display message? > > Is the book I am reading is the proper book for me at this time? > What would you suggest me to read?Agile Web Development with Rails http://www.pragmaticprogrammer.com/titles/rails/index.html> I appriciate your help. > > Happy Holidays. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Bill Guindon (aka aGorilla)
I''d just like to put my support behind the Agile Web Dev with Rails book. I started there and I think it is a superb book by a couple of very clear thinking and clear writing people. bruce On 13-Dec-05, at 2:04 PM, Bill Guindon wrote:> On 12/13/05, Igor Zaretsky <izaret-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: >> My name is Igor. >> >> I am, probably, a bit newer then new, even though I program for 10+ >> years. >> I can program RPG(Mainframe), VB(Lotus Notes), some Delphi. >> I went through "ONLamp_com Rolling with Ruby on Rails/cookbok" >> tutorial >> and I made some kind of fancy rhtmls with very basic functions. >> >> My goal is to make a db, put on the web for the group where I >> belong and >> others (fly fishing). >> >> I am currently reading "Programming Ruby" book. >> >> One thing definetely screws up my sweet dreams: how to do validation? >> I know "if" and "else", but >> where to put them? >> in which folder? >> how to pop up or display message? >> >> Is the book I am reading is the proper book for me at this time? >> What would you suggest me to read? > > Agile Web Development with Rails > http://www.pragmaticprogrammer.com/titles/rails/index.html > >> I appriciate your help. >> >> Happy Holidays. >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > Bill Guindon (aka aGorilla) > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I second that... Frank ----- Original Message ----- From: "Bruce Balmer" <brucebalmer-ee4meeAH724@public.gmane.org> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> Sent: Wednesday, December 14, 2005 8:55 AM Subject: Re: [Rails] Where to start?> I''d just like to put my support behind the Agile Web Dev with Rails > book. I started there and I think it is a superb book by a couple of > very clear thinking and clear writing people. > > bruce > > > On 13-Dec-05, at 2:04 PM, Bill Guindon wrote: > >> On 12/13/05, Igor Zaretsky <izaret-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: >>> My name is Igor. >>> >>> I am, probably, a bit newer then new, even though I program for 10+ >>> years. >>> I can program RPG(Mainframe), VB(Lotus Notes), some Delphi. >>> I went through "ONLamp_com Rolling with Ruby on Rails/cookbok" >>> tutorial >>> and I made some kind of fancy rhtmls with very basic functions. >>> >>> My goal is to make a db, put on the web for the group where I >>> belong and >>> others (fly fishing). >>> >>> I am currently reading "Programming Ruby" book. >>> >>> One thing definetely screws up my sweet dreams: how to do validation? >>> I know "if" and "else", but >>> where to put them? >>> in which folder? >>> how to pop up or display message? >>> >>> Is the book I am reading is the proper book for me at this time? >>> What would you suggest me to read? >> >> Agile Web Development with Rails >> http://www.pragmaticprogrammer.com/titles/rails/index.html >> >>> I appriciate your help. >>> >>> Happy Holidays. >>> >>> -- >>> Posted via http://www.ruby-forum.com/. >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> >> -- >> Bill Guindon (aka aGorilla) >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Is the book still current for RoR 1.0? On 12/14/05, Frank <farocco-H+0wwilmMs3R7s880joybQ@public.gmane.org> wrote:> > I second that... > > Frank > ----- Original Message ----- > From: "Bruce Balmer" <brucebalmer-ee4meeAH724@public.gmane.org> > To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Sent: Wednesday, December 14, 2005 8:55 AM > Subject: Re: [Rails] Where to start? > > > > I''d just like to put my support behind the Agile Web Dev with Rails > > book. I started there and I think it is a superb book by a couple of > > very clear thinking and clear writing people. > > > > bruce > > > > > > On 13-Dec-05, at 2:04 PM, Bill Guindon wrote: > > > >> On 12/13/05, Igor Zaretsky <izaret-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: > >>> My name is Igor. > >>> > >>> I am, probably, a bit newer then new, even though I program for 10+ > >>> years. > >>> I can program RPG(Mainframe), VB(Lotus Notes), some Delphi. > >>> I went through "ONLamp_com Rolling with Ruby on Rails/cookbok" > >>> tutorial > >>> and I made some kind of fancy rhtmls with very basic functions. > >>> > >>> My goal is to make a db, put on the web for the group where I > >>> belong and > >>> others (fly fishing). > >>> > >>> I am currently reading "Programming Ruby" book. > >>> > >>> One thing definetely screws up my sweet dreams: how to do validation? > >>> I know "if" and "else", but > >>> where to put them? > >>> in which folder? > >>> how to pop up or display message? > >>> > >>> Is the book I am reading is the proper book for me at this time? > >>> What would you suggest me to read? > >> > >> Agile Web Development with Rails > >> http://www.pragmaticprogrammer.com/titles/rails/index.html > >> > >>> I appriciate your help. > >>> > >>> Happy Holidays. > >>> > >>> -- > >>> Posted via http://www.ruby-forum.com/. > >>> _______________________________________________ > >>> Rails mailing list > >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>> http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >> > >> > >> -- > >> Bill Guindon (aka aGorilla) > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 12/13/05, Igor Zaretsky <izaret-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > I am currently reading "Programming Ruby" book.Awesome book!> One thing definetely screws up my sweet dreams: how to do validation? > I know "if" and "else", but > where to put them? > in which folder? > how to pop up or display message?Agile Web Development explains all of this. Definitely get it! In short validation/popup goes in the model like this: validates_format_of :image_url, :with => %r{^http:.+\.(gif|jpg|jpeg|png)$}i, :message => "mist be a URL for a GIF, JPG, JPEG, or PNG image"> Is the book I am reading is the proper book for me at this time? > What would you suggest me to read?
The agile book is still good, but the newest features aren''t documented (RJS templates for example). But you''ll learn all but the most advanced things.> One thing definetely screws up my sweet dreams: how to do validation? > I know "if" and "else", but > where to put them? > in which folder? > how to pop up or display message?You know how the web works? 1. you click the submit-button of your form 2. the application checks the data in the form 3. the application generates HTML and sends it to the browser 4. the browser displays the HTML So the message should be in the result HTML. If you do a: ruby script/generate scaffold Post And open models/post.rb you should see something like: class Post < ActiveRecord::Base end A Post has a title. And every post should have a title so you must type in the form or get an errormessage. We need to add a validation for this: class Category < ActiveRecord::Base validates_presence_of :title end This validates the presence of the title. This will be checked every time you save a Post. The message should be above the form: <%= error_messages_for ''post'' %> <!--[form:post]--> <p><label for="category_title">Title</label><br/> <%= text_field ''post'', ''title'' %></p> <!--[eoform:post]--> The first line displays all error messages. -- Posted via http://www.ruby-forum.com/.