Sha256: 8f604b91d4916fe11b572f52915bd454294bdd30aa373a4998b1887e56e0b26b

Contents?: true

Size: 851 Bytes

Versions: 20

Compression:

Stored size: 851 Bytes

Contents

local_assigns[:api].<%= model_name_underscored %> do
  local_assigns[:api].id <%= model_name_underscored %>.id
  <%- db_columns.keys.each do |column_name| -%>
  local_assigns[:api].<%= column_name %> <%= model_name_underscored %>.<%= column_name %>
  <%- end -%>
  <%- if acts_as_customizable? -%>
  render_api_custom_values <%= model_name_underscored %>.visible_custom_field_values, local_assigns[:api]
  <%- end -%>
  <%- if acts_as_attachable? -%>
  local_assigns[:api].array :attachments do
    <%= model_name_underscored %>.attachments.each do |attachment|
      render_api_attachment attachment, local_assigns[:api]
    end
  end if include_in_api_response?('attachments')
  <%- end -%>

  call_hook :helper_render_api_<%= model_name_underscored %>, { api: local_assigns[:api], <%= model_name_underscored %>: <%= model_name_underscored %> }
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
redmine_extensions-0.6.3 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.6.2 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.6.1 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.6.0 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.5 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.5.1 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.4 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.3 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.1 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.0 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.4.0.beta lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.11 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.10 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.9 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.8 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.7 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.6 lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.4 lib/generators/redmine_extensions/entity/templates/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.3 lib/generators/redmine_extensions/entity/templates/_%model_name_underscored%.api.rsb.tt
redmine_extensions-0.3.2 lib/generators/redmine_extensions/entity/templates/_%model_name_underscored%.api.rsb.tt