0

I have the following code:

<% case action_name %>
<% when 'one' %>
    <p>One</p>
<% when 'two' || 'three' %>
    <p>Two and Three</p>
<% end %>

But it doesn't seem to work. Is there any way of using the case approach and performing a case with multiple parameters, like the second case on my example?

gespinha
  • 7,968
  • 16
  • 57
  • 91

1 Answers1

2

Try this out:

<% case action_name %>
<% when 'one' %>
    <p>One</p>
<% when 'two', 'three' %>
    <p>Two and Three</p>
<% end %>