Sha256: 5a147eb7ad69867df1126c23250f9c507441f9a2ad33124e6a77436c648c7dca

Contents?: true

Size: 596 Bytes

Versions: 6

Compression:

Stored size: 596 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module SimpleFormInputs
        def self.prepended(base)
          base.class_option :simple_form_inputs,
            type: :boolean,
            default: true,
            desc: 'Install custom simple_form inputs'
        end

        def finish_template
          return super unless options[:simple_form] && options[:simple_form_inputs]
          copy_file 'static_input.rb', 'app/inputs/static_input.rb'
          copy_file 'select2_input.rb', 'app/inputs/select2_input.rb'
          super
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/stationed/generators/plugins/simple_form_inputs.rb
stationed-0.5.0 lib/stationed/generators/plugins/simple_form_inputs.rb
stationed-0.4.0 lib/stationed/generators/plugins/simple_form_inputs.rb
stationed-0.3.0 lib/stationed/generators/plugins/simple_form_inputs.rb
stationed-0.2.0 lib/stationed/generators/plugins/simple_form_inputs.rb
stationed-0.1.0 lib/stationed/generators/plugins/simple_form_inputs.rb