# Noob question: ruby script/generate BeforeAfter

**URL:** <https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893>\
**Category:** Rails\
**Created:** [December 7, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893 "2009-12-07T15:22:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [December 7, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893/1 "2009-12-07T15:22:02Z")

</div>

I ran  
rails StresslessHomeStaging  
as well as webrick.

Feeding [http://localhost:3000](http://localhost:3000) to Firefox works fine.

I then ran  
ruby script/generate controller BeforeAfter

This created BeforeAfterController

I then did

class BeforeAfterController \< ApplicationController  
def before\_and\_after  
end  
end

I then fed  
[http://localhost:3000/BeforeAfter/before\_and\_after](http://localhost:3000/BeforeAfter/before_and_after)  
to Firefox expecting a Template is Missing error.

Instead, I get a  
Routing Error  
No route matches “/BeforeAfter/before\_and\_after” with {:method=\>:get}

Clearly, I do not understand what the proper routing is.

What is the proper routing when a controller has multiple capitals in  
the name?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [December 7, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893/2 "2009-12-07T15:29:05Z")

</div>

Ralph S. wrote:

> What is the proper routing when a controller has multiple capitals in  
> the name?

I figured it out … it’s  
[http://localhost:3000/before\_after/before\_and\_after](http://localhost:3000/before_after/before_and_after)

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [December 7, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893/3 "2009-12-07T15:35:25Z")

</div>

Ralph S. wrote:

> I figured it out … it’s  
> [http://localhost:3000/before\_after/before\_and\_after](http://localhost:3000/before_after/before_and_after)

But that leaves another question …

Why does  
[http://localhost:3000/BEFORE\_AFTER/before\_and\_after](http://localhost:3000/BEFORE_AFTER/before_and_after)  
generate an (expected) “Template is missing”

but  
[http://localhost:3000/before\_after/before\_and\_After](http://localhost:3000/before_after/before_and_After) (note the  
capital A)  
generates a  
Unknown action  
No action responded to before\_and\_After. Actions: before\_and\_after

Is Ruby case insensitive in the controller name but case sensitive in  
the action name???

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [December 7, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/noob-question-ruby-script-generate-beforeafter/179893/4 "2009-12-07T16:04:31Z")

</div>

> Is Ruby case insensitive in the controller name but case sensitive in  
> the action name???

Ruby routes are case sensitive.
