Sha256: 62c44ab71ebaf404a83f2f4ab85bf7bd98a03522870e07603f64526480f03ab3

Contents?: true

Size: 463 Bytes

Versions: 2

Compression:

Stored size: 463 Bytes

Contents

require 'rails'
require 'spine/generators'

module Spine
  module Generators
    class ControllerGenerator < Base
      source_root File.expand_path("../templates", __FILE__)
      desc "Generate a Spine controller"

      def create_controller
        template "controller.coffee.erb", File.join(
          "app/assets/javascripts", 
          app_name, "controllers", 
          class_path, file_name.pluralize + ".coffee"
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spine-rails-0.0.7 lib/generators/spine/controller/controller_generator.rb
spine-rails-0.0.6 lib/generators/spine/controller/controller_generator.rb