score:2

Accepted answer

Not exactly sure what you're trying to do, but it appears like you just need to change this

this.category == <%= @show_me %>;

to this

this.category = "<%= @show_me %>";

Although you should be aware that anything with the <%= %> tags is prerendered before the page is loaded.

Update:

Looks like what you're trying to do might involve some AJAX. You might consider looking through this tutorial since this is a semi-complicated topic, and can be confusing if you have no experience with it.


Related Query

More Query from same tag