Sha256: ee53b59300f54566381a65cf602e824af82902f4e41cb20bafe9ce93cec6534b

Contents?: true

Size: 531 Bytes

Versions: 8

Compression:

Stored size: 531 Bytes

Contents

require 'rails/generators'

module ActsAsSeoable
  module Generators
    class AdminViewHelperGenerator < Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)
      
      def generate_config_file
        if Gem.loaded_specs.has_key?('activeadmin')
          template '_view_helper.html.arb', 'app/views/acts_as_seoable/_view_helper.html.arb'
        else
          raise StandardError, 'Could not generate activeadmin helper page without activeadmin installed.'
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fi_seo-0.1.7 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.6 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.5 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.4 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.3 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.2 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.1 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb
fi_seo-0.1.0 lib/generators/acts_as_seoable/admin_view_helper/admin_view_helper_generator.rb