Sha256: 717814ed23d2efb77903bdecbe72ae9b39cef43999907345f98155d8447acbdf

Contents?: true

Size: 365 Bytes

Versions: 44

Compression:

Stored size: 365 Bytes

Contents

module Jsonapi
  class ControllerGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)

    def create_resource
      template_file = File.join(
        'app/controllers',
        class_path,
        "#{file_name.pluralize}_controller.rb"
      )
      template 'jsonapi_controller.rb', template_file
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
jsonapi-resources-0.10.7 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.6 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.5 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.4 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.12 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.3 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.2 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.11 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.1 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta9 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta8 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta7 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta6 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.10 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.9 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta5 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.8 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.10.0.beta4 lib/generators/jsonapi/controller_generator.rb
jsonapi-resources-0.9.7 lib/generators/jsonapi/controller_generator.rb