RailsCasts Pro episodes are now free!

Learn more or hide this

Uday's Profile

GitHub User: udaykadaboina

Comments by Uday

Avatar

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 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?

Thanks,