Sha256: 994d829e4fc072bdcfdc3b3a5652f23ecbc78bed7e3d6cb26c4844e1c2aaf7e4

Contents?: true

Size: 348 Bytes

Versions: 10

Compression:

Stored size: 348 Bytes

Contents

class <%= @p_class_name %>IndexTableSection < Prime::TableSection
  def collection_data
    <%= @s_class_name %>.all.map do |model|
      <%= @p_class_name %>IndexCellSection.new(model: model)
    end
  end

  def on_click(index)
    section = data[index.row]
    screen.open_screen '<%= @p_name %>#show', params: { model: section.model }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
motion-prime-1.0.7 generators/templates/scaffold/table.rb
motion-prime-1.0.6 generators/templates/scaffold/table.rb
motion-prime-1.0.5 generators/templates/scaffold/table.rb
motion-prime-1.0.4 generators/templates/scaffold/table.rb
motion-prime-1.0.3 generators/templates/scaffold/table.rb
motion-prime-1.0.2 generators/templates/scaffold/table.rb
motion-prime-1.0.1 generators/templates/scaffold/table.rb
motion-prime-1.0.0 generators/templates/scaffold/table.rb
motion-prime-0.9.9.2 generators/templates/scaffold/table.rb
motion-prime-0.9.9.1 generators/templates/scaffold/table.rb