What would be the case if I dont want to specify the gender array in the /users/show.html.erb page as collection: [["Male", "Male"], ["Female", "Female"], ["", "Unspecified"]]
but rather define an array in the gender action inside the user class and reference it on show page?
def gender
['Male', 'Female']
end
and how to call these in the index using best_in_place syntax?
Hi Ryan, Indeed great screencast.
What would be the case if I dont want to specify the gender array in the
/users/show.html.erb page
ascollection: [["Male", "Male"], ["Female", "Female"], ["", "Unspecified"]]
but rather define an array in the gender action inside the user class and reference it on show page?
def gender
['Male', 'Female']
end
and how to call these in the index using best_in_place syntax?
Thanks,