Sha256: 408b205b8a1a36ad45bb33a70345349c35eca1e17b8c8a1b3f124a45122de24a
Contents?: true
Size: 567 Bytes
Versions: 24
Compression:
Stored size: 567 Bytes
Contents
module Tao module Generators class ControllerGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :actions, type: :array, default: %w(index new create edit update show destroy), banner: "action action" check_class_collision suffix: "Controller" attr_reader :resource def create_controller_file @resource = file_name.singularize template "controller.rb.erb", File.join('app/controllers', class_path, "#{file_name}_controller.rb") end end end end
Version data entries
24 entries across 24 versions & 1 rubygems