Created
May 30, 2018 15:07
-
-
Save CodePint/de576891dd2889e90ae820fa451d6fa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_controller_files | |
if file_name.pluralize.singularize == file_name | |
puts "*** Warning this is a singular file name, convention dictactes plural names be used for controllers *** " | |
else | |
puts "plural file_name confirmed" | |
end | |
template "controller.rb", File.join("app/controllers", class_path, "#{file_name}_controller.rb") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment