Trying to get some good advice on the best approach to using arrays for form select but using the same array to test inclusion of for the validation.
Right now I have it but building the arrays within the elements and validation ie,
# Form
<%= f.select(:status, [['Live','live'], ['Paused', 'paused']]) %>
# Model
validates :status, :inclusion => { :in => %w(live paused) }
I'm sure there would be a better way to store these arrays and use them !
Thanks for any advise you can provide.