Sha256: 429469fa70229a0f7d6d58ddf52b074832c140ff02bba8a887c0e3fb944349f0
Contents?: true
Size: 470 Bytes
Versions: 9
Compression:
Stored size: 470 Bytes
Contents
class SchofieldFormGenerator < FormGenerator protected def add_options!(opt) super opt.on('--parent PARENT_PATH', "Specify the parent for the specified model.") do |v| options[:parent] = v if v.present? end end def form_model array = [':admin'] array << "@#{options[:parent]}" unless options[:parent].nil? array << "@#{singular_name.singularize}" "[#{array.join(', ')}]" end end
Version data entries
9 entries across 9 versions & 1 rubygems