Sha256: 993da2e75873499b415c176367eb9a3e24e30ada9dbbe36a778c9dbfcc9765b4
Contents?: true
Size: 658 Bytes
Versions: 11
Compression:
Stored size: 658 Bytes
Contents
module Spina class EmbedGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) argument :attributes, type: :array, default: [], banner: "field field" def create_embed_object template "app/models/spina/embeds/embed.rb.tt", "app/models/spina/embeds/#{file_name}.rb" end def create_views template "app/views/spina/embeds/_fields.html.erb", "app/views/spina/embeds/#{plural_file_name}/_#{file_name}_fields.html.erb" template "app/views/spina/embeds/_partial.html.erb", "app/views/spina/embeds/#{plural_file_name}/_#{file_name}.html.erb" end end end
Version data entries
11 entries across 11 versions & 1 rubygems