fix rails plugin new CamelCasedName bug #3696

Merged
merged 2 commits into from Nov 19, 2011

Projects

None yet

2 participants

@lest
Contributor
lest commented Nov 19, 2011

refs #3684

@josevalim josevalim commented on an outdated diff Nov 19, 2011
...s/generators/rails/plugin_new/plugin_new_generator.rb
def name
- @name ||= File.basename(destination_root)
+ unless @name
@josevalim
josevalim Nov 19, 2011 Member

Awesome. However, could you please use the @name ||= begin ... end style instead of unless @name. The former gives no warnings about instance variables not being initializer while the latter does, thanks!

@lest
Contributor
lest commented Nov 19, 2011

@josevalim, fixed

@josevalim josevalim merged commit 43158e5 into rails:master Nov 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment