Sha256: c016cc0c185a7d286a196e208ee4ec2ec7cc779efe23ab831897148200af6920
Contents?: true
Size: 454 Bytes
Versions: 2
Compression:
Stored size: 454 Bytes
Contents
module WebammToRails module Sources module Models class AttachmentDefinition class Presenter def initialize(column:) @column = column end def render if @column.name == @column.name.pluralize "has_many_attached :#{@column.name}" else "has_one_attached :#{@column.name}" end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webamm_to_rails-7.0.1 | lib/webamm_to_rails/sources/models/attachment_definition/presenter.rb |
webamm_to_rails-7.0.0 | lib/webamm_to_rails/sources/models/attachment_definition/presenter.rb |