2

Rails 4.1.6
Ruby 2.2.2
active_scaffold 3.4.28

I have error when enter in a view of active_scaffold

no implicit conversion of Symbol into Integer

<% for name in [:info, :warning, :error] %>
  <% if flash[name] %> <<< ------- Got The Error
    <div class="<%= "#{name}-message message" %>">
      <%= display_message flash[name] %>
      <% if request.xhr? %>


 /home.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/active_scaffold-3.4.28/app/views/active_scaffold_overrides/_list_messages.html.erb,      
 /home.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/active_scaffold-3.4.28/app/views/active_scaffold_overrides/_list.html.erb, 

I dont know why I have problem with the flash messages, some suggestion?

Arvind
  • 2,671
  • 1
  • 18
  • 32
Daniel Arenas
  • 485
  • 5
  • 15

1 Answers1

0

You have used two times double quotes which would not work. As you have passed symbol in the class you need to convert in to string name.to_s

There are many ways to print

<div class="<%= name.to_s %>-message message">

or

<div class='<%= "#{name.to_s}-message message"%>'>
Arvind
  • 2,671
  • 1
  • 18
  • 32