Sha256: 88e3e883e52bd16c230a9935ed3ebe03dd42a6268007d84b6c13df88c6ca5214
Contents?: true
Size: 1.12 KB
Versions: 18
Compression:
Stored size: 1.12 KB
Contents
class <%= @p_class_name %>Screen < ApplicationScreen title "<%= @p_title %>" # open_screen "<%= @p_name %>#index" def index set_title "<%= @p_title %>" set_navigation_right_button 'New' do open_screen "<%= @p_name %>#new" end set_section :<%= @p_name %>_index_table end # open_screen "<%= @p_name %>#show" def show @model = params[:model] set_title "Show <%= @s_title %>" set_navigation_back_button 'Back' set_navigation_right_button 'Edit' do open_screen "<%= @p_name %>#edit", params: { model: @model } end set_section :<%= @p_name %>_show, model: @model end # open_screen "<%= @p_name %>#edit" def edit @model = params[:model] set_title "Edit <%= @s_title %>" set_navigation_back_button 'Cancel' set_section :<%= @p_name %>_form, model: @model end # open_screen "<%= @p_name %>#new" def new @model = <%= @s_class_name %>.new set_title "New <%= @s_title %>" set_navigation_back_button 'Cancel' set_section :<%= @p_name %>_form, model: @model end def on_return if action?(:index) || action?(:show) refresh end end end
Version data entries
18 entries across 18 versions & 1 rubygems