Sha256: 98f3fc3a79b0567f1a7479d8a17617a4b46ac5dfbd203b3778bbab756239f995
Contents?: true
Size: 789 Bytes
Versions: 1
Compression:
Stored size: 789 Bytes
Contents
require 'rails/generators/resource_helpers' module CancanBootstrap module Generators class ControllerGenerator < Rails::Generators::NamedBase include Rails::Generators::ResourceHelpers source_root File.expand_path('../templates', __FILE__) check_class_collision :suffix => "Controller" class_option :orm, :banner => "NAME", :type => :string, :required => true, :desc => "ORM to generate the controller for" class_option :http, :type => :boolean, :default => false, :desc => "Generate controller with HTTP actions only" def create_controller_files template "controller.rb", File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-cancan-bootstrap-scaffold-0.0.1 | lib/generators/cancan_bootstrap/controller/controller_generator.rb |