html - erb without rails helpers -


i'm switching python app ruby , need implement erb html , clueless how implement of basic things. seems recommends using rails helpers aren't available me. i'm trying below line work. figured in loop interpolated, links aren't working. appreciated.

 <% employee in @employees %>         <div class="col-sm-6 col-md-3 employee">             <a style="text-align:center;" href="/employee/#{employee.id}" class="thumbnail">               <% if !employee.filename? %>                 <img src='#{settings.employee_image_url}'>                <% else %>               <img src='#{settings.no_image_url}'>               <% end %> 

the follow should fix issue.

<img src="<%= settings.no_image_url %>"> 

string interpolation executed ruby, "#{settings.no_image_url}" not ruby string in context you're using it.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -