Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better model name validation
  • Loading branch information
Alexander Zubkov authored and ryanb committed Dec 31, 2010
1 parent 7451a81 commit 41f5d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/nifty/scaffold/scaffold_generator.rb
Expand Up @@ -25,7 +25,7 @@ class ScaffoldGenerator < Base
def initialize(*args, &block)
super

print_usage unless model_name =~ /^[a-zA-Z_]+$/
print_usage unless model_name =~ /^[a-zA-Z0-9_]+$/ and model_name =~ /^[a-zA-Z]/

@controller_actions = []
@model_attributes = []
Expand Down

0 comments on commit 41f5d07

Please sign in to comment.