You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
1.4 KiB
15 lines
1.4 KiB
<%# add :controller_id => :as_records to respond in records list, not a's %> |
|
|
|
<%if controller.send :successful?%> |
|
ActiveScaffold.replace_html('<%=active_scaffold_messages_id(:controller_id => :as_records)%>','<%=escape_javascript(render(:partial => 'messages'))%>'); |
|
<%if @record%> |
|
ActiveScaffold.update_row('<%=element_row_id(:controller_id => :as_records, :action => :list, :id => @record.id)%>','<%=escape_javascript(render(:partial => 'list_record', :locals => {:record => @record}))%>'); |
|
<%end%> |
|
<% if active_scaffold_config.list.columns.any? {|c| c.calculation?}%> |
|
ActiveScaffold.replace('<%=active_scaffold_calculations_id(:controller_id => :as_records)%>', '<%=escape_javascript(render(:partial => 'list_calculations'))%>'); |
|
<% end %> |
|
<%else%> |
|
<%flash[:error] = active_scaffold_error_messages_for(@record, :object_name => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :header_message => '', :message => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :container_tag => nil, :list_type => :br)%> |
|
ActiveScaffold.replace_html('<%=active_scaffold_messages_id(:controller_id => :as_records)%>','<%=escape_javascript(render(:partial => 'messages'))%>'); |
|
ActiveScaffold.scroll_to('<%=active_scaffold_messages_id(:controller_id => :as_records)%>'); |
|
<%end%> |