The scaffolding generator does some name mangling, for example it does pluralization. However, it looks like there are some other rules and I do not understand them. I did a script/generate scaffold EVENTLOG whenSec:integer and I get the correct model, but I do get a number of underscores in numerous places, such as: app/views/eventlo_gs/index.html.erb app/controllers/eventlo_gs_controller.rb test/functional/eventlo_gs_controller_test.rb app/helpers/eventlo_gs_helper.rb route map.resources :eventlo_gs So: What situation triggers that added underscore and is there a possibility to turn it off? Thanx C. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Push :-) Ideas anyone ? :-) On Jan 17, 11:00 pm, X <c...-MrQZHDg9DaLQT0dZR+AlfA@public.gmane.org> wrote:> The scaffolding generator does some name mangling, for example it does > pluralization. > > However, it looks like there are some other rules and I do not > understand them. I did a > > script/generate scaffold EVENTLOG whenSec:integer > > and I get the correct model, but I do get a number of underscores in > numerous places, such as: > > app/views/eventlo_gs/index.html.erb > app/controllers/eventlo_gs_controller.rb > test/functional/eventlo_gs_controller_test.rb > app/helpers/eventlo_gs_helper.rb > route map.resources :eventlo_gs > > So: What situation triggers that added underscore and is there a > possibility to turn it off? > > Thanx > C.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 22 Jan 2009, at 20:57, X wrote:> > Push :-) > > Ideas anyone ? :-)Probably because it''s not expecting you to give it something all in caps. I''d guess it''s doing pluralize then camelize: "EVENTLOG".pluralize #=> "EVENTLOGs" and then it''s just confused. "EVENTLOGs".underscore => "eventlo_gs" Fred> > > On Jan 17, 11:00 pm, X <c...-MrQZHDg9DaLQT0dZR+AlfA@public.gmane.org> wrote: >> The scaffolding generator does some name mangling, for example it >> does >> pluralization. >> >> However, it looks like there are some other rules and I do not >> understand them. I did a >> >> script/generate scaffold EVENTLOG whenSec:integer >> >> and I get the correct model, but I do get a number of underscores in >> numerous places, such as: >> >> app/views/eventlo_gs/index.html.erb >> app/controllers/eventlo_gs_controller.rb >> test/functional/eventlo_gs_controller_test.rb >> app/helpers/eventlo_gs_helper.rb >> route map.resources :eventlo_gs >> >> So: What situation triggers that added underscore and is there a >> possibility to turn it off? >> >> Thanx >> C. > >--~--~---------~--~----~------------~-------~--~----~ 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 was thinking the same thing. Try just capitalizing the first letter and see if that fixes it. On Jan 22, 6:36 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 22 Jan 2009, at 20:57, X wrote: > > > > > Push :-) > > > Ideas anyone ? :-) > > Probably because it''s not expecting you to give it something all in > caps. I''d guess it''s doing pluralize then camelize: > > "EVENTLOG".pluralize #=> "EVENTLOGs" > and then it''s just confused. > "EVENTLOGs".underscore => "eventlo_gs" > > Fred > > > > > On Jan 17, 11:00 pm, X <c...-MrQZHDg9DaLQT0dZR+AlfA@public.gmane.org> wrote: > >> The scaffolding generator does some name mangling, for example it > >> does > >> pluralization. > > >> However, it looks like there are some other rules and I do not > >> understand them. I did a > > >> script/generate scaffold EVENTLOG whenSec:integer > > >> and I get the correct model, but I do get a number of underscores in > >> numerous places, such as: > > >> app/views/eventlo_gs/index.html.erb > >> app/controllers/eventlo_gs_controller.rb > >> test/functional/eventlo_gs_controller_test.rb > >> app/helpers/eventlo_gs_helper.rb > >> route map.resources :eventlo_gs > > >> So: What situation triggers that added underscore and is there a > >> possibility to turn it off? > > >> Thanx > >> C. > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yep. Thanx. On Jan 23, 4:10 am, Bob Martens <boblmart...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I was thinking the same thing. Try just capitalizing the first letter > and see if that fixes it. > > On Jan 22, 6:36 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On 22 Jan 2009, at 20:57, X wrote: > > > > Push :-) > > > > Ideas anyone ? :-) > > > Probably because it''s not expecting you to give it something all in > > caps. I''d guess it''s doing pluralize then camelize: > > > "EVENTLOG".pluralize #=> "EVENTLOGs" > > and then it''s just confused. > > "EVENTLOGs".underscore => "eventlo_gs" > > > Fred > > > > On Jan 17, 11:00 pm, X <c...-MrQZHDg9DaLQT0dZR+AlfA@public.gmane.org> wrote: > > >> The scaffolding generator does some name mangling, for example it > > >> does > > >> pluralization. > > > >> However, it looks like there are some other rules and I do not > > >> understand them. I did a > > > >> script/generate scaffold EVENTLOG whenSec:integer > > > >> and I get the correct model, but I do get a number of underscores in > > >> numerous places, such as: > > > >> app/views/eventlo_gs/index.html.erb > > >> app/controllers/eventlo_gs_controller.rb > > >> test/functional/eventlo_gs_controller_test.rb > > >> app/helpers/eventlo_gs_helper.rb > > >> route map.resources :eventlo_gs > > > >> So: What situation triggers that added underscore and is there a > > >> possibility to turn it off? > > > >> Thanx > > >> C.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---