Forum: Ruby on Rails Markaby problem, in need of help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cd8c9864d88bcafc164d8fdb820cc451?d=identicon&s=25 Chris (Guest)
on 2006-04-05 13:14
Hi, i've just started using Markaby and I think it's great but I have a
problem.  How would i recreate the following:

<select id="timesheet_state" name ="timesheet_state">
    <option value="" <%if @timesheet_state==nil%>
                        <%="selected"%>
                        <% end %>>[All States]</option>
    <option value="2" <%if @timesheet_state.to_i==2%>
                        <%="selected"%>
</select>

Any help appreciated,
Thanks,
Chris
This topic is locked and can not be replied to.