Tagged Questions
4
votes
2answers
178 views
Carousel code review
Is there a better way to implement my carousel in less lines? Currently my solution is:
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<% ...
4
votes
1answer
106 views
Refactor ruby each-code
def users_list
html = ''
self.users.each do |user|
html << user.link_avatar_tag
end
html.html_safe
end
I feel that it is possible to write shorter.
Is it possible ...
5
votes
3answers
181 views
Setting bgcolor in Ruby. What's the proper way to do it?
<p style="background-color:#<%= debate.bg_color %>;" >
be_color is a method of Debate that returns a string like 45FFFF.
Although it does what I want, this seems like a tremendously bad ...