Sha256: 442816b90f5ea0f42076e2d327b465a6925d26cc4262911d6fe02c1726d77c25

Contents?: true

Size: 1.03 KB

Versions: 15

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module RailsAppGenerator
  # Custom add-ons for RailsAppGenerator
  module AddOns
    # Add Ransack to rails application
    class Ransack < RailsAppGenerator::Addon
      required_gem gem.version('ransack', '3.2.1', 'Object-based searching.')

      def apply
        say 'Setting up Ransack'
        # template('ransack_template.rb', 'target/ransack.rb', force: true)
        # template('app/javascript/stylesheets/components.scss')
        # create_file('target/ransack.rb', 'put your content here')
        # directory 'app/template', 'app/target', force: true
        # empty_directory 'app/target'
        # inject_into_file('app/application.js', "some content")
        # rails_command('tailwindcss:install')
      end

      def before_template
        say 'Setting up Ransack - before custom template'
      end

      def before_bundle
        say 'Setting up Ransack - before bundle install'
      end

      def after_bundle
        say 'Setting up Ransack - after bundle install'
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.5 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.4 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.3 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.2 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.1 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.3.0 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.43 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.42 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.41 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.40 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.39 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.38 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.37 lib/rails_app_generator/addons/ransack.rb
rails_app_generator-0.2.36 lib/rails_app_generator/addons/ransack.rb