Removed redundant partial

proposal dashboard actions views use shared/errors partial instead of
its current errors partial
This commit is contained in:
Juan Salvador Pérez García
2018-06-22 17:40:51 +02:00
parent 28e17abe72
commit 3ee9f9b059
3 changed files with 6 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
class Admin::ProposalDashboardActionsController < Admin::BaseController
helper_method :proposal_dashboard_action
helper_method :proposal_dashboard_action, :resource
def index
@proposal_dashboard_actions = ProposalDashboardAction.all
@@ -46,6 +46,10 @@ class Admin::ProposalDashboardActionsController < Admin::BaseController
private
def resource
@proposal_dashboard_action
end
def proposal_dashboard_action_params
params
.require(:proposal_dashboard_action)

View File

@@ -1,13 +0,0 @@
<% if proposal_dashboard_action.errors.any? %>
<div id="error_explanation" data-alert class="callout alert" data-closable>
<button class="close-button" aria-label="<%= t('application.close') %>" type="button" data-close>
<span aria-hidden="true">&times;</span>
</button>
<strong>
<%= proposal_dashboard_action.errors.count %>
<%= t('admin.proposal_dashboard_actions.errors.form.error', count: proposal_dashboard_action.errors.count) %>
</strong>
</div>
<% end %>

View File

@@ -1,6 +1,6 @@
<%= form_for [:admin, proposal_dashboard_action] do |f| %>
<%= render 'errors' %>
<%= render 'shared/errors' %>
<div class="row">
<div class="small-12 column">