As soon as I did not try - before applying to rails - the buttons work fine, but as soon as I apply it in the form - they become not clickable. Can there be a separate online guide on how to use different html / css effects to rails? I searched, but found nothing - where everything would be shown with specific examples. I would appreciate an example of proper overlay.
html:
<input type="radio" id="demo-priority-normal" name="demo-priority"> <label for="demo-priority-normal">3</label> <input type="radio" id="demo-priority-high" name="demo-priority"> <label for="demo-priority-high">7</label> rails:
<%= f.radio_button :three, '3_days', checked: true %> <%= f.label :three, 'До 3 дней', value: '3_days' %> <%= f.radio_button :seven, '7_days', checked: false %> <%= f.label :seven, 'До 7 дней', value: '7_days' %> Update:
Created the Expectation model and associated it with Shipment through the Shipment_Association model. Then added a collection of radio buttons to the form. The radio buttons work fine, but the result is the same - when creating, all values remain nil.
Shipment model:
belongs_to :user belongs_to :friendship has_many :shipment_expectations has_many :expectations, through: :shipment_expectations Expectation model:
has_many :shipment_expectations has_many :shipments, through: :shipment_expectations ShipmentExpectation model:
belongs_to :shipment belongs_to :expectation The form:
<%= f.collection_radio_buttons :expectation_ids, Expectation.all, :id, :name %>