Hi, I am looking for a replacement for the static scaffolding of Rails 1.2.x. Rails 2.x has stopped proving the scaffolding. Specifically I want to generate a controller from an existing model and I want to have and freeze the code. Basically I just want to generate a scaffold on which I am going to build my app (back and frontend). It is also an example of code (I am still a newbie). In 1.2.x the command was : script/generate scaffold post blog/post I quickly checked active_scaffold and streamlined. But I am not sure they allow accessing the actual view code (rhtml/rjs/ruby), do they ? Is static scaffolding completely deprecated, for everybody ? H -- 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 -~----------~----~----~----~------~----~------~--~---
And speaking of Active_Scaffold and Streamlined, do they support polymorphism ? Harry Seldon wrote:> Hi, > > I am looking for a replacement for the static scaffolding of Rails > 1.2.x. > Rails 2.x has stopped proving the scaffolding. > > Specifically I want to generate a controller from an existing model and > I want to have and freeze the code. Basically I just want to generate a > scaffold on which I am going to build my app (back and frontend). It is > also an example of code (I am still a newbie). > In 1.2.x the command was : > script/generate scaffold post blog/post > > I quickly checked active_scaffold and streamlined. But I am not sure > they allow accessing the actual view code (rhtml/rjs/ruby), do they ? > > Is static scaffolding completely deprecated, for everybody ? > > H-- 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 -~----------~----~----~----~------~----~------~--~---
You can type: ruby script/generate scaffold --help in your rails application directory and you''ll get the information on scaffolding. Only dynamic scaffolding is gone in 2.0 to my knowledge, not static. On Feb 7, 2:27 pm, Harry Seldon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I am looking for a replacement for the static scaffolding of Rails > 1.2.x. > Rails 2.x has stopped proving the scaffolding. > > Specifically I want to generate a controller from an existing model and > I want to have and freeze the code. Basically I just want to generate a > scaffold on which I am going to build my app (back and frontend). It is > also an example of code (I am still a newbie). > In 1.2.x the command was : > script/generate scaffold post blog/post > > I quickly checked active_scaffold and streamlined. But I am not sure > they allow accessing the actual view code (rhtml/rjs/ruby), do they ? > > Is static scaffolding completely deprecated, for everybody ? > > H > -- > 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 -~----------~----~----~----~------~----~------~--~---
scaffold in Rails 2.0 is what was called scaffold_resource in Rails 1.2.x. It generates a static scaffold using RESTful design. Michael Slater www.BuildingWebApps.com On Feb 7, 1:11 pm, longint <michael.me...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You can type: ruby script/generate scaffold --help in your rails > application directory and you''ll get the information on scaffolding. > Only dynamic > scaffolding is gone in 2.0 to my knowledge, not static. > > On Feb 7, 2:27 pm, Harry Seldon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Hi, > > > I am looking for a replacement for the static scaffolding of Rails > > 1.2.x. > > Rails 2.x has stopped proving the scaffolding. > > > Specifically I want to generate a controller from an existing model and > > I want to have and freeze the code. Basically I just want to generate a > > scaffold on which I am going to build my app (back and frontend). It is > > also an example of code (I am still a newbie). > > In 1.2.x the command was : > > script/generate scaffold post blog/post > > > I quickly checked active_scaffold and streamlined. But I am not sure > > they allow accessing the actual view code (rhtml/rjs/ruby), do they ? > > > Is static scaffolding completely deprecated, for everybody ? > > > H > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
OK but can you generate a restful controller from an already existing model ? From what I understood it is not possible but I want to be sure. H Michael Slater wrote:> scaffold in Rails 2.0 is what was called scaffold_resource in Rails > 1.2.x. It generates a static scaffold using RESTful design. > > Michael Slater > www.BuildingWebApps.com-- 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 -~----------~----~----~----~------~----~------~--~---
Yes, you can. script/generate scaffold MyModel --skip-migration Include --skip-migration to bypass the migration generation (you won''t need it since you''ve already got the model). This will give you the scaffold but the views themselves may not auto-populate with the fields. You could also "script/generate controller MyModelsController index show new create edit update delete" This definitely will not get the auto-layout stuff, but it will stub things out for you. If you do this you''ll need to add your own map.resources statement to routes.rb. HTH, AndyV On Feb 9, 7:01 am, Harry Seldon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> OK but can you generate a restful controller from an already existing > model ? > > From what I understood it is not possible but I want to be sure. > > H > > Michael Slater wrote: > > scaffold in Rails 2.0 is what was called scaffold_resource in Rails > > 1.2.x. It generates a static scaffold using RESTful design. > > > Michael Slater > >www.BuildingWebApps.com > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thx for the answer, I gonna check that. But the part I liked in the controller generation was in fact the form generation. It helps a lot the newbies (newbie even in html) like me. I am surprised it has been deprecated. I am still looking for it in AS or streamlined. H AndyV wrote:> Yes, you can. script/generate scaffold MyModel --skip-migration > > Include --skip-migration to bypass the migration generation (you won''t > need it since you''ve already got the model). This will give you the > scaffold but the views themselves may not auto-populate with the > fields. > > You could also "script/generate controller MyModelsController index > show new create edit update delete" This definitely will not get the > auto-layout stuff, but it will stub things out for you. If you do > this you''ll need to add your own map.resources statement to routes.rb. > > > HTH, > AndyV > > On Feb 9, 7:01 am, Harry Seldon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>-- 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 -~----------~----~----~----~------~----~------~--~---
Well, if you just want the forms, I made a generator to make that available in Rails 2.0 gem install scaffold_form_generator See this for more info: http://scaffoldform.rubyforge.org/ It does NOT generate controllers... just the views for new and edit, along with the partial. On Sun, Feb 10, 2008 at 4:22 PM, Harry Seldon < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Thx for the answer, I gonna check that. But the part I liked in the > controller generation was in fact the form generation. It helps a lot > the newbies (newbie even in html) like me. I am surprised it has been > deprecated. > I am still looking for it in AS or streamlined. > > H > > > AndyV wrote: > > Yes, you can. script/generate scaffold MyModel --skip-migration > > > > Include --skip-migration to bypass the migration generation (you won''t > > need it since you''ve already got the model). This will give you the > > scaffold but the views themselves may not auto-populate with the > > fields. > > > > You could also "script/generate controller MyModelsController index > > show new create edit update delete" This definitely will not get the > > auto-layout stuff, but it will stub things out for you. If you do > > this you''ll need to add your own map.resources statement to routes.rb. > > > > > > HTH, > > AndyV > > > > On Feb 9, 7:01 am, Harry Seldon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > -- > 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 -~----------~----~----~----~------~----~------~--~---
That looks like what I was looking for ! Thanks a lot. H Brian Hogan wrote:> Well, if you just want the forms, I made a generator to make that > available > in Rails 2.0 > > gem install scaffold_form_generator > > See this for more info: > > http://scaffoldform.rubyforge.org/ > > It does NOT generate controllers... just the views for new and edit, > along > with the partial. > > On Sun, Feb 10, 2008 at 4:22 PM, Harry Seldon <-- 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 -~----------~----~----~----~------~----~------~--~---