I am trying to build a simple search/show tool as a first iteration of a larger project. I only have one table right now and I would like to implement active scaffold from the start of this project. I have tried several times but I am having trouble with active scaffold. I have my one table, I can easily create my model and controller several ways but one of the 3 steps in implementing active scaffold is to modify the layout: <%= javascript_include_tag :defaults %> <%= active_scaffold_includes %> problem is, if I create a project, then create my model and then controller - I don''t have a layout, nor do I really know how to create one or what to put in it. I tried implementing scaffold first and that works in giving me a layout to work with but I cant convert it over to active scaffold plus that seems like the clunky way to do it. To me it should be rails <proj name> ruby script/generate model <singular od table name> ruby script/generate controller <whatever> **implement AS**** can anyone help with this layout issue (i am not real good on the view side of things i guess thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 6, 2008 12:38 PM, agilehack <jason.rabolli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> <%= javascript_include_tag :defaults %> > <%= active_scaffold_includes %> > can anyone help with this layout issue (i am not real good on the view > side of things i guessActive Scaffold needs the following: In your application layout file - put the active_scaffold_includes like you did. In your controller put: active_scaffold :modal_plurals In your routes.rb file, put map.resources :model_name, :active_scaffold => true This should give you a pure scaffold web page. Then go to activescaffold website, and look at customizing views. Regards Mikel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thank you thank you couple questions: 1. i don''t have a layouts file do I? that is my problem. I know I need to add those two lines to it but unless i scaffold or something I do not have a layouts file in my project period. Do i just create a blank layouts file and just have those two lines? if i simply create a model and controller off the one table I don''t have a layout I guess is my point and if i have to create one manually i don''t really know how - what do i put in it, what do i call it ...etc 2. in the controller what does this mean ...active_scaffold :modal_plurals ??? i thought it was active_scaffold: <model name> (model being singular 3. in the routes.rb file I will do what you say but why did the active scaffold site not say anything about modifying this file? thanks a ton! On Feb 5, 9:22 pm, "Mikel Lindsaar" <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Feb 6, 2008 12:38 PM, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > <%= javascript_include_tag :defaults %> > > <%= active_scaffold_includes %> > > can anyone help with this layout issue (i am not real good on the view > > side of things i guess > > Active Scaffold needs the following: > > In your application layout file - put the active_scaffold_includes like you did. > In your controller put: > > active_scaffold :modal_plurals > > In your routes.rb file, put > > map.resources :model_name, :active_scaffold => true > > This should give you a pure scaffold web page. > > Then go to activescaffold website, and look at customizing views. > > Regards > > Mikel--~--~---------~--~----~------------~-------~--~----~ 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 got it, thanks for the help On Feb 5, 9:43 pm, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> thank you thank you > > couple questions: > > 1. i don''t have a layouts file do I? that is my problem. I know I > need to add those two lines to it but unless i scaffold or something I > do not have a layouts file in my project period. Do i just create a > blank layouts file and just have those two lines? if i simply create > a model and controller off the one table I don''t have a layout I guess > is my point and if i have to create one manually i don''t really know > how - what do i put in it, what do i call it ...etc > > 2. in the controller what does this > mean ...active_scaffold :modal_plurals ??? i thought it was > active_scaffold: <model name> (model being singular > > 3. in the routes.rb file I will do what you say but why did the active > scaffold site not say anything about modifying this file? > > thanks a ton! > > On Feb 5, 9:22 pm, "Mikel Lindsaar" <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Feb 6, 2008 12:38 PM, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > <%= javascript_include_tag :defaults %> > > > <%= active_scaffold_includes %> > > > can anyone help with this layout issue (i am not real good on the view > > > side of things i guess > > > Active Scaffold needs the following: > > > In your application layout file - put the active_scaffold_includes like you did. > > In your controller put: > > > active_scaffold :modal_plurals > > > In your routes.rb file, put > > > map.resources :model_name, :active_scaffold => true > > > This should give you a pure scaffold web page. > > > Then go to activescaffold website, and look at customizing views. > > > Regards > > > Mikel- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---