Closed abitdodgy closed 9 years ago
Why not use view helpers on line 47 of index.html.erb? For example:
= link_to "Completed", params.merge(complete: false), class: ('selected' if params[:completed] == 'false')
Instead of...
<a id="active" href="/?completed=false" class="<%= "selected" if request.fullpath.match("completed=false") %>">Active</a>
Is it a matter of preference or are you trying to gain some performance?
Definitely just silly coding. I don't believe there is any performance advantage to be gained in not using link helpers - and if there was, you should just cache the results instead of not using the helper.
Why not use view helpers on line 47 of index.html.erb? For example:
Instead of...
Is it a matter of preference or are you trying to gain some performance?