I am having a problem with some conditional logic with Ruby. Admittedly I am a newbie to all things Ruby.
This code is causing the site not to load:
<body style="background-image:url("<%= if @is_home_page.present? '/images/bg-main-power-bg.jpg' else '/images/bg-inner-power-bg.jpg' end %>"); background-repeat:repeat-x;">
Without the conditional the CSS loads just fine.
What am I doing wrong?
Thanks
Use the ternary operator for inline conditionals.
For your specific case: