Sha256: 08e517062a5ff62508faa4cf304aa437189e3ffffebb4f46b88c6cf9ae703638

Contents?: true

Size: 834 Bytes

Versions: 13

Compression:

Stored size: 834 Bytes

Contents

require_relative "../super_scaffold_base"
require "scaffolding/routes_file_manipulator"

class ConversationsGenerator < Rails::Generators::Base
  include SuperScaffoldBase

  source_root File.expand_path("templates", __dir__)

  namespace "super_scaffold:conversations"

  argument :target_model
  argument :parent_model

  def generate
    if defined?(BulletTrain::Conversations)
      # We add the name of the specific super_scaffolding command that we want to
      # invoke to the beginning of the argument string.
      ARGV.unshift "conversations"
      BulletTrain::SuperScaffolding::Runner.new.run
    else
      puts "You must have Conversations installed if you want to use this generator.".red
      puts "Please refer to the documentation for more information: https://bullettrain.co/docs/conversations"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bullet_train-super_scaffolding-1.10.0 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.9.0 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.5 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.4 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.3 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.2 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.1 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.8.0 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.7.23 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.7.22 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.7.21 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.7.20 lib/generators/super_scaffold/conversations/conversations_generator.rb
bullet_train-super_scaffolding-1.7.19 lib/generators/super_scaffold/conversations/conversations_generator.rb