Bootstrap progress bar

21 views
Skip to first unread message

Dave Castellano

unread,
Jul 12, 2014, 7:10:07 PM7/12/14
to rubyonra...@googlegroups.com
Anyone know how to set the progress bar value in the controller and pass
it to
the view?
I tried the following:

Controller/show: @progress_bar_num = "25%"

View/show:
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow=<%=
@p_bar_number %> aria-valuemin="0" aria-valuemax="100" style="width: <%=
@p_bar_num%>;">
<%=@p_bar_num%>
</div>
</div>


Not even close...

Thanks!

Dave

--
Posted via http://www.ruby-forum.com/.

Dave Castellano

unread,
Jul 12, 2014, 11:01:19 PM7/12/14
to rubyonra...@googlegroups.com
OK, got it. Have to set the width of .bar through javascript / jQuery.
Reply all
Reply to author
Forward
0 new messages