Skip to content

Commit ac29a44

Browse files
committed
[DSL] Fixed the class_name in the generate Rake task
Before the patch: constant_score => Constant_score After the patch: constant_score => ConstantScore
1 parent f2968af commit ac29a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ namespace :generate do
116116

117117
name = options[:name].downcase
118118

119-
class_name = options[:name].capitalize
119+
class_name = options[:name].split('_').map(&:capitalize).join
120120

121121
option_methods = options[:option_methods].to_s.split('/').reduce('') do |sum, item|
122122
sum << " "

0 commit comments

Comments
 (0)