Sha256: 41b7a9e5616d98be07d0c88c11db1cabd5ab20b730c6e32bb0e67c65a27a9a3c

Contents?: true

Size: 350 Bytes

Versions: 7

Compression:

Stored size: 350 Bytes

Contents

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
motion-prime-0.9.8 generators/templates/scaffold/table.rb
motion-prime-0.9.7 generators/templates/scaffold/table.rb
motion-prime-0.9.6 generators/templates/scaffold/table.rb
motion-prime-0.9.5 generators/templates/scaffold/table.rb
motion-prime-0.9.4 generators/templates/scaffold/table.rb
motion-prime-0.9.3 generators/templates/scaffold/table.rb
motion-prime-0.9.2 generators/templates/scaffold/table.rb