Ruby on Rails
Monday, August 7, 2017
model:
REPRESENTS_TYPES = ["Individual","Publicity firm","Record label"]
validates :represents, inclusion: REPRESENTS_TYPES
form:
<div class="field">
<%= f.label :represents %><br>
<%= f.select :represents, User::REPRESENTS_TYPES, prompt: ('Select') %>
</div>
-- REPRESENTS_TYPES = ["Individual","Publicity firm","Record label"]
validates :represents, inclusion: REPRESENTS_TYPES
form:
<div class="field">
<%= f.label :represents %><br>
<%= f.select :represents, User::REPRESENTS_TYPES, prompt: ('Select') %>
</div>
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c9382a59-ea0e-4208-834f-d360d1dbb192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment