Class: PublicActivity::Generators::ActivityGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/generators/public_activity/activity/activity_generator.rb

Overview

Activity generator that creates activity model file from template

Instance Method Summary collapse

Instance Method Details

#generate_filesObject

Create model in project's folder


11
12
13
# File 'lib/generators/public_activity/activity/activity_generator.rb', line 11

def generate_files
  copy_file 'activity.rb', "app/models/#{name}.rb"
end