When I created a rails project as ''HelloWorld'' and a controller as ''HelloWorld'', ruby created control called hello_world instead of HelloWorld. Why is that? Why is it not using the name I am providing to create? 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 -~----------~----~----~----~------~----~------~--~---
I think that''s just a Rails standard...I could be wrong though. On Jun 11, 2:59 pm, DBC User <dbcu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When I created a rails project as ''HelloWorld'' and a controller as > ''HelloWorld'', ruby created control called hello_world instead of > HelloWorld. Why is that? Why is it not using the name I am providing > to create? > 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 Jun 11, 2:21 pm, longint <michael.me...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think that''s just a Rails standard...I could be wrong though. > > On Jun 11, 2:59 pm, DBC User <dbcu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > When I created a rails project as ''HelloWorld'' and a controller as > > ''HelloWorld'', ruby created control called hello_world instead of > > HelloWorld. Why is that? Why is it not using the name I am providing > > to create? > > Thanks.- Hide quoted text - > > - Show quoted text -What is the standard? Is there a definition somewhere how the names change? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2007-Jun-11 19:44 UTC
Re: Newbie question - HelloWorld
Hi -- On Mon, 11 Jun 2007, DBC User wrote:> > > > On Jun 11, 2:21 pm, longint <michael.me...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I think that''s just a Rails standard...I could be wrong though. >> >> On Jun 11, 2:59 pm, DBC User <dbcu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >>> When I created a rails project as ''HelloWorld'' and a controller as >>> ''HelloWorld'', ruby created control called hello_world instead of >>> HelloWorld. Why is that? Why is it not using the name I am providing >>> to create? >>> Thanks.- Hide quoted text - >> >> - Show quoted text - > > What is the standard? Is there a definition somewhere how the names > change?It''s all done according to Ruby conventions/traditions. If you generate a controller called HelloWorld, you''ll get a file called hello_world_controller.rb, with a class called HelloWorldController defined inside it. That''s in keeping with Ruby file-naming and class-naming conventions. Similar things will happen with models: if you generate a Thing model, you''ll get things.rb with class Thing inside it. David -- * Books: RAILS ROUTING (new! http://safari.awprofessional.com/9780321509246) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.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 -~----------~----~----~----~------~----~------~--~---
Is the controller named hello_world or just the file? My guess is that on the filesystem you have a file called hello_world_controller.rb, but if you look inside at the first line where it defines the class, it is probably called HelloWorld. Chris On 6/11/07, DBC User <dbcuser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > When I created a rails project as ''HelloWorld'' and a controller as > ''HelloWorld'', ruby created control called hello_world instead of > HelloWorld. Why is that? Why is it not using the name I am providing > to create? > Thanks. > > > > >-- www.fuzzylizard.com You know you''ve achieved perfection in design, Not when you have nothing more to add, But when you have nothing more to take away. -- Antoine de Saint-Exupery --~--~---------~--~----~------------~-------~--~----~ 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 Jun 11, 2:45 pm, "Chris Johnston" <fuzzyliz...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is the controller named hello_world or just the file? My guess is that on > the filesystem you have a file called hello_world_controller.rb, but if you > look inside at the first line where it defines the class, it is probably > called HelloWorld. > > Chris > > On 6/11/07, DBC User <dbcu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > When I created a rails project as ''HelloWorld'' and a controller as > > ''HelloWorld'', ruby created control called hello_world instead of > > HelloWorld. Why is that? Why is it not using the name I am providing > > to create? > > Thanks. > > --www.fuzzylizard.com > > You know you''ve achieved perfection in design, Not when you have nothing > more to add, But when you have nothing more to take away. > -- Antoine de Saint-ExuperyThe name of controller is hello_world instead of helloworld. 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 -~----------~----~----~----~------~----~------~--~---