I try to create and Display errors in Rails, I have a problem for that.
Here my code:
controller:
flash[:errors] = []
flash[:errors] << [:message => t('clubs.errors.no_contact'), :strong => new_member_params[:email] + ': ']
view:
<% if flash[:errors].present? %>
<% flash[:errors].each do |error| %>
<div class="alert alert-danger">
<a class="close" aria-hidden="true" href="#" data-dismiss="alert">×</a>
<strong><%= error[:strong] %></strong>
<%= error[:message] %>
</div>
<% end %>
<% end %>
and I have this error :
TypeError in Clubs#members
no implicit conversion of Symbol into Integer
on this line:
<strong><%= error[:strong] %></strong>
Any idea ?