As basic as it sounds, I can't make the date_helper default to a date, as in:
- semantic_form_for resource do |f|
- f.inputs do
= f.input :issued_on, :default => Date.today
= f.buttons
The above just renders blank columns if resource does not have a date.
Would appreciate any pointer on what I'm possibly doing wrong.
You can set the default on the object itself on your controller
def edit
@resource = Resource.find(params[:id])
@resource.issued_on ||= Date.today
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With