Sha256: 1bfb51efe5e3664a4b5efe7ded7b772fbd2fae5522fb1539dff93852973539ae
Contents?: true
Size: 671 Bytes
Versions: 2
Compression:
Stored size: 671 Bytes
Contents
require 'generators/thorax/resource_helpers' module Thorax module Generators class ModelGenerator < Rails::Generators::NamedBase include Thorax::Generators::ResourceHelpers source_root File.expand_path("../templates", __FILE__) desc "This generator creates a thorax model" argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" def create_thorax_model template "model.coffee", "#{thorax_path}/models/#{file_name}.js.coffee" end def create_thorax_collection template "collection.coffee", "#{thorax_path}/collections/#{file_name}.js.coffee" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thorax-rails-1.0.0 | lib/generators/thorax/model/model_generator.rb |
thorax-rails-0.1.8 | lib/generators/thorax/model/model_generator.rb |