#80 new
Charlie Mezak

pluralization of resource names

Reported by Charlie Mezak | November 22nd, 2010 @ 09:18 PM

My first attempt to use Objective Resource involved a resource with a non-standard pluralization. I found the spot in the source that I had to deal with by searching for @"s" and finding the line where "s" is appended to the resource name. I just added a conditional statement to bypass the append when that particular resource name is used, but I'm sure that there's a smarter, more general way to do this. I'm also sure that I don't know what that is. The RoR source must contain a good solution for this.

I'd be happy to try to contribute to this project by making and submitting the needed changes to handle this kind of situation, but I'm new to git and open source in general. I'd really like to be able to use OR in my projects, so I'll try to get up to speed and make some contributions.

  • Charlie

Comments and changes to this ticket

  • Charlie Mezak

    Charlie Mezak November 22nd, 2010 @ 09:41 PM

    I see the example code in which one overrides the getRemoteCollectionName method like so

    // handle pluralization 
    + (NSString *)getRemoteCollectionName {
        return @"people";
    }
    

    Whoops! That's a great solution.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Port of Rails' ActiveResource framework to the iPhone.

Shared Ticket Bins

People watching this ticket

Pages