Sha256: 58deacbf59cd206e2da136f62aefa01d530a49077342284678c1d30b70bf7a22
Contents?: true
Size: 544 Bytes
Versions: 1
Compression:
Stored size: 544 Bytes
Contents
require 'rails/generators/active_record' module MyFeeds module Generators class LikesGenerator < ActiveRecord::Generators::Base argument :name, :type => :string, :default => 'likes' def self.source_root @source_root ||= File.join(File.dirname(__FILE__), '../templates') end def create_migration migration_template 'likes_migration.rb', 'db/migrate/likes_migration.rb' end def create_model template "like.rb", File.join('app/models', "like.rb") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my_feeds-1.0.0 | lib/generators/my_feeds/likes_generator.rb |