Query with select and find in rails

0
Hello, I wanted to do a find with select from just a few fields in rails, but it is giving error, but if I do with where it works normally, does anyone know if it is possible to use select with find? Ex:

@organization = Organization.find(actual_organization.id).select(:required_project_type, :required_folder_type)
    
asked by anonymous 07.12.2016 / 11:32

1 answer

1

Do as follows:

@organization = Organization.find(actual_organization.id, :select => [:required_project_type, :required_folder_type])
    
07.12.2016 / 12:20