Sha256: 54a2a391a8a580cb5e014e7eb149226de8829414fa9b16eb8bb2cf714f9365be
Contents?: true
Size: 817 Bytes
Versions: 6
Compression:
Stored size: 817 Bytes
Contents
<% # Read only fields. if @resource[:class].typus_field_options_for(:read_only).include?(attribute) value = 'read_only' if %w( edit ).include?(params[:action]) end # Auto generated fields. if @resource[:class].typus_field_options_for(:auto_generated).include?(attribute) value = 'auto_generated' if %w( new edit ).include?(params[:action]) end comment = %w( read_only auto_generated ).include?(value) ? "<small>#{value} field</small>".humanize : '' attribute_humanized = @resource[:class].human_attribute_name(attribute) attribute_humanized += " (#{attribute})" if attribute.include?('_id') %> <li><label for="item_<%= attribute %>"><%= attribute_humanized %> <%= comment %></label> <%= text_field :item, attribute, :class => 'text', :disabled => attribute_disabled?(attribute) %></li>
Version data entries
6 entries across 6 versions & 1 rubygems