Sha256: 22e11d523cb81b728aa9bff3df6f566418132c2693df7f52ac93a35b33415335
Contents?: true
Size: 567 Bytes
Versions: 13
Compression:
Stored size: 567 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
13 entries across 13 versions & 1 rubygems