Sha256: d678caf04ce927ac0ff82968cdc1de2fa92660137557820ea99b5fe770615e8d
Contents?: true
Size: 568 Bytes
Versions: 24
Compression:
Stored size: 568 Bytes
Contents
module Typus module Generators class ControllerGenerator < Rails::Generators::NamedBase source_root File.expand_path("../../templates", __FILE__) alias_method :resource, :name desc <<-MSG Description: Generates admin controllers for the given resource. MSG def generate_controller template "controller.erb", "app/controllers/admin/#{file_name}_controller.rb" end hook_for :test_framework do |instance, generator| instance.invoke generator, ["admin/#{instance.name}"] end end end end
Version data entries
24 entries across 24 versions & 2 rubygems