Sha256: 7102b0592d1961b4fe27a629e08b80792cc5f19729dc78a99e788cf217b64c70
Contents?: true
Size: 566 Bytes
Versions: 17
Compression:
Stored size: 566 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.rb", "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
17 entries across 17 versions & 1 rubygems