Remove ":" from ruby ​​on rails time_select auxiliary output?

I want to remove the ":" from the time_select rails output. The assistant seems to display this automatically when creating the minutes selection window.

Any ideas?

Thanks!

+4
source share
1 answer

The output from these helpers is usually a string, so you should be able to say:

<%= time_select("post", "sunrise").gsub(/:/, ' ') %> 

[Edit] It turns out a cleaner solution is just to say:

 <%= time_select("post", "sunrise", :time_separator => "" %> 
+8
source

All Articles