Sha256: de93d15b3abe4a85a7b254ecbb6bd3badca1686ff53368702a038cb6c87e4367

Contents?: true

Size: 566 Bytes

Versions: 2

Compression:

Stored size: 566 Bytes

Contents

require 'generators/backbone/resource_helpers'

module Backbone
  module Generators
    class ModelGenerator < Rails::Generators::NamedBase
      include Backbone::Generators::ResourceHelpers
        
      source_root File.expand_path("../templates", __FILE__)
      desc "This generator creates a backbone model"
      
      argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
    
      def create_backbone_model
        template "model.coffee", "#{backbone_path}/models/#{file_name}.coffee"
      end
    
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails-backbone-0.2.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.1.2 lib/generators/backbone/model/model_generator.rb