Hey all, I try to ask intelligent question about Ruby on Rails, and only after I search for the answers myself. Recently, I''ve hit a frustrating bump on the learning curve and it seems really stupid. I''m making a user system, and working on the update method. When I create the form in the same manner as taught in Agile Development with Rails and a number of other tutorials (assign an object in the controler, and then use FormHelper methods to create the form in the view) I run into issues with the password field. I hash all the passwords, and they''re inputted by default into the passsword field. I want this field to be blank, like the password_confirmation field is, but I don''t know how. So I looked at the rails documentation, and the password helper works just like the text_field helper... okay, so I look at the documentation for THAT, and here is where the problem is, and I''ve seen this a number of times before. When I look at the documentation (reference: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000389), I look at text_field at the very bottom. It lists as parameters three things. I figure that the solution to my problem is by passing an option in the options hash. But I don''t know the syntax and don''t want to guess at it. Tell me how, generally, to find a list of available options for a function -- I can''t seem to figure it out. This would help me a number of different times, because I run into this issue quite often. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Brian, if you take another look at the AWDwRv2, it provides the answer for you on page 484 of the PDF. You may also see usage on page 162 as well. Next, are you attempting to edit the password field? I believe this is the case. Then you''ll need to do the following: :value => "" Note: The option that you use for the password_field would be very similar to the options that you would use within HTML. Good luck, -Conrad On 12/19/06, Bryan Cox <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hey all, > > I try to ask intelligent question about Ruby on Rails, and only after I > search for the answers myself. Recently, I''ve hit a frustrating bump on > the learning curve and it seems really stupid. > > I''m making a user system, and working on the update method. When I > create the form in the same manner as taught in Agile Development with > Rails and a number of other tutorials (assign an object in the > controler, and then use FormHelper methods to create the form in the > view) I run into issues with the password field. I hash all the > passwords, and they''re inputted by default into the passsword field. I > want this field to be blank, like the password_confirmation field is, > but I don''t know how. > > So I looked at the rails documentation, and the password helper works > just like the text_field helper... okay, so I look at the documentation > for THAT, and here is where the problem is, and I''ve seen this a number > of times before. > > When I look at the documentation (reference: > http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000389), > I look at text_field at the very bottom. It lists as parameters three > things. I figure that the solution to my problem is by passing an > option in the options hash. But I don''t know the syntax and don''t want > to guess at it. Tell me how, generally, to find a list of available > options for a function -- I can''t seem to figure it out. This would > help me a number of different times, because I run into this issue quite > often. > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Brian, it''s OK to experiment. -Conrad On 12/20/06, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey Brian, if you take another look at the AWDwRv2, it provides the > answer for you on page 484 of the PDF. You may also see usage on page > 162 as well. Next, are you attempting to edit the password field? I > believe this is the case. Then you''ll need to do the following: > > :value => "" > > Note: The option that you use for the password_field would be very > similar to the options that you would use within HTML. > > Good luck, > > -Conrad > > On 12/19/06, Bryan Cox <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > Hey all, > > > > I try to ask intelligent question about Ruby on Rails, and only after I > > search for the answers myself. Recently, I''ve hit a frustrating bump on > > the learning curve and it seems really stupid. > > > > I''m making a user system, and working on the update method. When I > > create the form in the same manner as taught in Agile Development with > > Rails and a number of other tutorials (assign an object in the > > controler, and then use FormHelper methods to create the form in the > > view) I run into issues with the password field. I hash all the > > passwords, and they''re inputted by default into the passsword field. I > > want this field to be blank, like the password_confirmation field is, > > but I don''t know how. > > > > So I looked at the rails documentation, and the password helper works > > just like the text_field helper... okay, so I look at the documentation > > for THAT, and here is where the problem is, and I''ve seen this a number > > of times before. > > > > When I look at the documentation (reference: > > http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000389), > > I look at text_field at the very bottom. It lists as parameters three > > things. I figure that the solution to my problem is by passing an > > option in the options hash. But I don''t know the syntax and don''t want > > to guess at it. Tell me how, generally, to find a list of available > > options for a function -- I can''t seem to figure it out. This would > > help me a number of different times, because I run into this issue quite > > often. > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, its frustrating. Some parts of the API are well documented and some, like the FormHelper methods, stink. The forum is a good place to search if the API doesn''t answer your question. Also, GUESSING can work well too. For example, :value => "blah" will set the default value in a text field but is not documented anywhere as far as I can see. Same with :style => (css stuff here) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Your not alone Bryan. At the moment we are all learning by experimentation and trial, which is not really good enough. The Rails framework is fantasic, the community is good and there are plenty of gurus sharing their Ruby-foo, but the core documentation is lacking; hence the Caboo.e effort (http://blog.caboo.se/pages/documentation_drive). The real problem IMHO is a combination of rdoc and the actual documentation. While rdocs format works, the navigation is cumbersome and it lacks some of the other commands needed for rails development (such as rake or generate). Personally, I need more examples to grasp the options for many of the functions. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Taylor and Conrad, Thanks for the help. I did end up finding the documentation in AWDwRv2 (had to think for a moment what you were talking about with the acronym!) My specific problem, however, illustrated a common problem I''ve experienced with the documentation a number of times... It feels stinky that in order to get full documentation on an open source product, I would have to purchase a book authored by someone intrinsically involved in the creation of Rails. I''d purchase the book anyway because documentation doesn''t give you a "How to get started" (generally), and I don''t mind the person making money..... anyway, enough with a rant of frustration. One more question: What books go more in-depth than AWDwRv2? I''d like to learn a lot more about the object structure, etc. and can see doing this with the docs, but not all of it. Conrad Taylor wrote:> Hey Brian, if you take another look at the AWDwRv2, it provides the > answer for you on page 484 of the PDF. You may also see usage on page > 162 as well. Next, are you attempting to edit the password field? I > believe this is the case. Then you''ll need to do the following: > > :value => "" > > Note: The option that you use for the password_field would be very > similar to the options that you would use within HTML. > > Good luck, > > -Conrad-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeremy McAnally
2006-Dec-20 20:04 UTC
Re: Rails Framework Documentation - More Info, Please
The best next step seems to be Ruby for Rails and/or something like Rails Recipes or Ruby/Rails Cookbook. I found these resources to be excellent ways to deepen my understanding of Ruby and Rails while also picking up some interesting, time saving tricks. --Jeremy On 12/20/06, Bryan Cox <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Taylor and Conrad, > > Thanks for the help. I did end up finding the documentation in AWDwRv2 > (had to think for a moment what you were talking about with the > acronym!) My specific problem, however, illustrated a common problem > I''ve experienced with the documentation a number of times... It feels > stinky that in order to get full documentation on an open source > product, I would have to purchase a book authored by someone > intrinsically involved in the creation of Rails. I''d purchase the book > anyway because documentation doesn''t give you a "How to get started" > (generally), and I don''t mind the person making money..... anyway, > enough with a rant of frustration. > > One more question: > > What books go more in-depth than AWDwRv2? I''d like to learn a lot more > about the object structure, etc. and can see doing this with the docs, > but not all of it. > > > Conrad Taylor wrote: > > Hey Brian, if you take another look at the AWDwRv2, it provides the > > answer for you on page 484 of the PDF. You may also see usage on page > > 162 as well. Next, are you attempting to edit the password field? I > > believe this is the case. Then you''ll need to do the following: > > > > :value => "" > > > > Note: The option that you use for the password_field would be very > > similar to the options that you would use within HTML. > > > > Good luck, > > > > -Conrad > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Reading "Ruby For Rails" will help you understand why some of the things in Rails work the way they do. It''s a very worthwhile read. On 12/20/06, Jeremy McAnally <jeremymcanally-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > The best next step seems to be Ruby for Rails and/or something like > Rails Recipes or Ruby/Rails Cookbook. I found these resources to be > excellent ways to deepen my understanding of Ruby and Rails while also > picking up some interesting, time saving tricks. > > --Jeremy > > On 12/20/06, Bryan Cox <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > Taylor and Conrad, > > > > Thanks for the help. I did end up finding the documentation in AWDwRv2 > > (had to think for a moment what you were talking about with the > > acronym!) My specific problem, however, illustrated a common problem > > I''ve experienced with the documentation a number of times... It feels > > stinky that in order to get full documentation on an open source > > product, I would have to purchase a book authored by someone > > intrinsically involved in the creation of Rails. I''d purchase the book > > anyway because documentation doesn''t give you a "How to get started" > > (generally), and I don''t mind the person making money..... anyway, > > enough with a rant of frustration. > > > > One more question: > > > > What books go more in-depth than AWDwRv2? I''d like to learn a lot more > > about the object structure, etc. and can see doing this with the docs, > > but not all of it. > > > > > > Conrad Taylor wrote: > > > Hey Brian, if you take another look at the AWDwRv2, it provides the > > > answer for you on page 484 of the PDF. You may also see usage on page > > > 162 as well. Next, are you attempting to edit the password field? I > > > believe this is the case. Then you''ll need to do the following: > > > > > > :value => "" > > > > > > Note: The option that you use for the password_field would be very > > > similar to the options that you would use within HTML. > > > > > > Good luck, > > > > > > -Conrad > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
David, I''ve gone from zero programming skill to being able to roll web apps and actually improvise code with less than $200 invested in books. Not a bad deal, IMO. Here are some suggestions: Programming Ruby - a reference book for all the Ruby functions Ruby for Rails - good Ruby and OOP background The Ruby Way - a million examples of how to do things with Ruby Ruby/Rails Cookbook - great Rails examples But really only AWDwR goes into how RAILS works. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I don''t know why I wrote "David" when I meant "Bryan." -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---