lib/stationed/generators/plugins/simple_form_inputs.rb in stationed-0.0.1 vs lib/stationed/generators/plugins/simple_form_inputs.rb in stationed-0.1.0

- old
+ new

@@ -1,9 +1,17 @@ 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