I want to load my jquery tabs if a certain condition is true. Is it possible to have a ruby if statement embedded in document.ready() or by the time that is processed its too late? Is there a better way to accomplish this?
This doesn't seem to work:
<script>
$(document).ready(function() {
<% if @event.scheduled.empty? %>
$( "#tabs" ).tabs();
<% end %>
});
</script>