Forum: Ruby on Rails Need help making code more rails like!

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ryan P. (Guest)
on 2006-04-25 09:14
(Received via mailing list)
Hi all, I've been a PHP programmer for many years and I've recently
up ruby and rails and am loving it! However, I'm still learning the
way" of doing things and I've got a block of code that I think could use
face lift. Any help, tips, suggestions, you can offer in making it more
rails-like is greatly appreciated. The only thing that I need for sure
the call to check_box_tag(). Thanks in advance for any assistance!

The following code is contained within a partial (excuse the formatting

<% for course in @courses -%>
        <%= %>:
        <% if == session[:current_course].to_s -%>
            <%= check_box_tag 'post_courses[]',, true,
=> 'disabled'}  %><br />
        <% else -%>
            <%= check_box_tag 'post_courses[]', %><br />
        <% end -%>
    <% end -%>
This topic is locked and can not be replied to.