Sha256: d8b8ed132b9a5f9f7d38997a923aa28274c83eccc7f2aa0305abb608449b9278

Contents?: true

Size: 655 Bytes

Versions: 15

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators'

module BulmaFormRails
  module Generators
    class ViewsGenerator < Rails::Generators::Base
      source_root File.expand_path('../../templates', __FILE__)
      
      def copy_views
        gem_directory =  File.join(Gem.loaded_specs['bulma_form_rails'].full_gem_path, 'lib', 'templates', 'app', 'views', 'bulma_form_rails')
        app_directory = File.join('app', 'views', 'bulma_form_rails')
        Dir.each_child(gem_directory) do |template_file| 
          copy_file File.join(gem_directory, template_file), File.join(app_directory, template_file)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bulma_form_rails-1.0.6 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.5 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.4 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.3 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.2 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.1 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-1.0.0 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.9 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.8 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.7 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.6 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.5 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.4 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.3 lib/generators/bulma_form_rails/views_generator.rb
bulma_form_rails-0.9.1 lib/generators/bulma_form_rails/views_generator.rb