Sha256: c044248a675340d116bb5cc58c5ca72b90a0e33e76428ea2c5797491a72987af
Contents?: true
Size: 1.3 KB
Versions: 6
Compression:
Stored size: 1.3 KB
Contents
<% column = if render_field.is_a? ActiveScaffold::DataStructures::Column render_field else active_scaffold_config.columns[render_field] end return unless @main_columns.include? column.name @rendered ||= Set.new return if @rendered.include? column.name @rendered << column.name renders_as = column_renders_as(column) if renders_as == :subform options = {:is_subform => true, :field_class => "#{column.name}-sub-form"} else options = {:is_subform => false, :field_class => "#{column.name}-input", :hidden => column.form_ui == :hidden} end html = if scope readonly = @record.readonly? || !@record.authorized_for?(:crud_type => :update) crud_type = @record.new_record? ? :create : (readonly ? :read : :update) active_scaffold_render_subform_column(column, scope, crud_type, readonly, !active_scaffold_config.subform.columns.names_without_auth_check.include?(column.name), @record) else render_column(column, @record, renders_as, scope) end -%> ActiveScaffold.render_form_field('<%= source_id %>','<%= escape_javascript(html) %>', <%= options.to_json.html_safe %>); <%if column.update_columns && !column.update_columns.empty?%> <%= render(:partial => "render_field", :collection => column.update_columns, :locals => {:source_id => source_id, :scope => scope})%> <%end%>
Version data entries
6 entries across 6 versions & 1 rubygems