Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix error in constant name #354

Closed
wants to merge 1 commit into from

2 participants

@alindeman
Collaborator

Not sure if $ARGV is supposed to work, but it was just raising an error for me on MRI 1.9.2-p180. Seems like ARGV was intended.

@justinko justinko closed this in 27b0cf2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 16, 2011
  1. @alindeman

    Fix error in constant name

    alindeman authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/generators/rspec/scaffold/scaffold_generator.rb
View
4 lib/generators/rspec/scaffold/scaffold_generator.rb
@@ -67,7 +67,7 @@ def params
# support for namespaced-resources
def ns_file_name
- if $ARGV[0].match(/(\w+)\/(\w+)/)
+ if ARGV[0].match(/(\w+)\/(\w+)/)
"#{$1.underscore}_#{$2.singularize.underscore}"
else
file_name
@@ -76,7 +76,7 @@ def ns_file_name
# support for namespaced-resources
def ns_table_name
- if $ARGV[0].match(/(\w+)\/(\w+)/)
+ if ARGV[0].match(/(\w+)\/(\w+)/)
"#{$1.underscore}/#{$2.tableize}"
else
table_name
Something went wrong with that request. Please try again.