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.5.2.pre.4 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.3 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.2 lib/generators/avo/partial_card_generator.rb
avo-2.5.2.pre.1 lib/generators/avo/partial_card_generator.rb
avo-2.5.1 lib/generators/avo/partial_card_generator.rb
avo-2.5.0 lib/generators/avo/partial_card_generator.rb
avo-2.4.1 lib/generators/avo/partial_card_generator.rb
avo-2.4.0 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.6 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.5 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.4 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.3 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.2 lib/generators/avo/partial_card_generator.rb
avo-2.3.1.pre.1 lib/generators/avo/partial_card_generator.rb
avo-2.3.0 lib/generators/avo/partial_card_generator.rb
avo-2.2.2 lib/generators/avo/partial_card_generator.rb
avo-2.2.1 lib/generators/avo/partial_card_generator.rb
avo-2.2.0 lib/generators/avo/partial_card_generator.rb
avo-2.1.2.pre2 lib/generators/avo/partial_card_generator.rb
avo-2.1.2.pre1 lib/generators/avo/partial_card_generator.rb