Skip to content

Instantly share code, notes, and snippets.

View annikoff's full-sized avatar
💭
| (• ◡•)| (❍ᴥ❍ʋ)

Yakov annikoff

💭
| (• ◡•)| (❍ᴥ❍ʋ)
View GitHub Profile
@annikoff
annikoff / custom_generators.md
Last active December 17, 2024 11:38
Custom generators

The main generator

# lib/generators/rails/policy/policy_generator.rb

module Rails
  module Generators
    class PolicyGenerator < NamedBase
      source_root File.expand_path('templates', __dir__)

      def copy_policy_file