Sha256: 3771a511c4ede43a589cb2e66a2819034f5d552cf47decce70c48c55140d3dd5

Contents?: true

Size: 506 Bytes

Versions: 43

Compression:

Stored size: 506 Bytes

Contents

require "rails/generators"

module Generators
  module Avo
    class PartialCardGenerator < ::Rails::Generators::NamedBase
      source_root File.expand_path("templates", __dir__)

      namespace "avo:card:partial"
      desc "Add a partial card for your Avo dashboard."

      def handle
        template "cards/partial_card_sample.tt", "app/avo/cards/#{name.underscore}.rb"
        template "cards/partial_card_partial.tt", "app/views/avo/cards/_#{name.underscore}.html.erb"
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
avo-2.10.2 lib/generators/avo/partial_card_generator.rb
avo-2.9.2.pre1 lib/generators/avo/partial_card_generator.rb
avo-2.10.0 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre7 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre6 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre5 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre4 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre3 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre2 lib/generators/avo/partial_card_generator.rb
avo-2.9.1.pre1 lib/generators/avo/partial_card_generator.rb
avo-2.9.0 lib/generators/avo/partial_card_generator.rb
avo-2.8.0 lib/generators/avo/partial_card_generator.rb
avo-2.7.1.pre.1 lib/generators/avo/partial_card_generator.rb
avo-2.7.0 lib/generators/avo/partial_card_generator.rb
avo-2.6.1.pre.2 lib/generators/avo/partial_card_generator.rb
avo-2.6.1.pre.1 lib/generators/avo/partial_card_generator.rb
avo-2.6.0 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.7 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.6 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.5 lib/generators/avo/partial_card_generator.rb