Sha256: 46257b8d3993d62fb13036aabf0247e475db236b39b098f9432526fa7f6c20b8

Contents?: true

Size: 569 Bytes

Versions: 18

Compression:

Stored size: 569 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}.js.coffee"
      end
    
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
bbr-wsm-1.1.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-1.2.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.9.10 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.9.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.8.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.7.2 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.7.1 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.7.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.6.1 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.6.0 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.6.0.rc lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.5 lib/generators/backbone/model/model_generator.rb
rails-backbone-sp-0.0.1 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.4 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.3 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.2 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.1 lib/generators/backbone/model/model_generator.rb
rails-backbone-0.5.0 lib/generators/backbone/model/model_generator.rb