houdini/app/views/components/_radio_set.html.erb
2020-06-15 10:26:57 -05:00

16 lines
610 B
Text

<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<%# use like this: render 'components/radio_set',
name: 'ticket_payment_method',
radios: ['Credit Card', 'Cash', 'Check'] %>
<%# you can pass in an optional html_class param for styling %>
<%# you can also pass in an optional key for 'def'ing values to it %>
<% html_class ||= '' %>
<% key ||= false %>
<% radios.each do |r| %>
<div class="<%= html_class %>">
<%= render 'components/radio', name: name, label: r, key: key %>
</div>
<% end %>