Hi, among lots other confusions herez one.. I found two kinda similar (:to me) => script/generate model business name:string address:string location_id:integer AND script/generate scaffold business name:string address:string location_id:integer but with model I couldn''t do this: http://localhost:port-number/businesses but with scaffold this url came with the option to give input which is saved in the database. So, I don''t use model but scaffold. So, can someone plz lighten me up on this. thnx.. -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-05 15:48 UTC
Re: difference between model and scaffold generators
On Oct 5, 4:01 pm, Jay Pangmi <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, among lots other confusions herez one.. I found two kinda similar > (:to me) => > script/generate model business name:string address:string > location_id:integer > AND > script/generate scaffold business name:string address:string > location_id:integer > > but with model I couldn''t do this:http://localhost:port-number/businesses > > but with scaffold this url came with the option to give input which is > saved in the database. > > So, I don''t use model but scaffold. So, can someone plz lighten me up on > this. thnx..model just genenates the model. Scaffold generates a controller and views too. Fred> -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig White
2008-Oct-05 15:53 UTC
Re: ****[Rails] Re: difference between model and scaffold generators
On Sun, 2008-10-05 at 08:48 -0700, Frederick Cheung wrote:> > > On Oct 5, 4:01 pm, Jay Pangmi <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > Hi, among lots other confusions herez one.. I found two kinda similar > > (:to me) => > > script/generate model business name:string address:string > > location_id:integer > > AND > > script/generate scaffold business name:string address:string > > location_id:integer > > > > but with model I couldn''t do this:http://localhost:port-number/businesses > > > > but with scaffold this url came with the option to give input which is > > saved in the database. > > > > So, I don''t use model but scaffold. So, can someone plz lighten me up on > > this. thnx.. > > model just genenates the model. Scaffold generates a controller and > views too.---- correct me if I''m wrong but I thought... script/generate model SOME_MODEL would also generate a migration script too Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jay Pangmi wrote:> Hi, among lots other confusions herez one.. I found two kinda similar > (:to me) => > script/generate model business name:string address:string > location_id:integer > AND > script/generate scaffold business name:string address:string > location_id:integer > > but with model I couldn''t do this: > http://localhost:port-number/businesses > > but with scaffold this url came with the option to give input which is > saved in the database. > > So, I don''t use model but scaffold. So, can someone plz lighten me up on > this. thnx.."./script/generate model mymodelname" creates an activerecord model that is usually linked to a database but doesn''t have to be. "./script/generate scaffold scaffoldname" creates a model, a controller, a layout, some css styles etc. This gives you the model plus everything else you would need to play with it. This doesn''t mean that scaffolding should be used all the time, it is good for quick development but it isn''t customisable enough and isn''t supposed to be used in a production environment. Hope this helps Matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Matt Harrison wrote:> "./script/generate model mymodelname" creates an activerecord model that > is usually linked to a database but doesn''t have to be. > > "./script/generate scaffold scaffoldname" creates a model, a controller, > a layout, some css styles etc. This gives you the model plus everything > else you would need to play with it. > > This doesn''t mean that scaffolding should be used all the time, it is > good for quick development but it isn''t customisable enough and isn''t > supposed to be used in a production environment. > > Hope this helps > > Mattthnx guys... -- 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 -~----------~----~----~----~------~----~------~--~---