Each company
in my database has many projects
, and every company is given a 'General tasks' project when they sign up. This particular project cannot be deleted by its company, and it is treated as a special repository for tasks
that have not yet been assigned to one of the company's other projects.
When displaying the company's projects, I want them to appear in alphabetical order but with the single exception that 'General tasks' appears at the top. This requires some kind of special handling of the project for sorting purposes. How can I take:
@projects = @company.projects
and sort it so we get a list like this:
'General tasks'
'ABC Project'
'BFA Project'
'ZNS Project'