nesquena / rabl

General ruby templating with json, bson, xml, plist and msgpack support
http://blog.codepath.com/2011/06/27/building-a-platform-api-on-rails/
MIT License
3.64k stars 334 forks source link

Inflection problem with XML #559

Open passalini opened 10 years ago

passalini commented 10 years ago

So, I have the inflection inflect.irregular 'lesson_progress', 'lessons_progresses' but collections in rabl ignore this inflection and singularize lessons_progresses to lessons_progress.

passalini commented 10 years ago

OK, I figure out and I forgot to tell that occurs in xml templates and those templates use dash-case, no snake_case. So, I have to create two inflections, one for snake_case and other for dash-case.

passalini commented 10 years ago

I reopen the issue to know from you if you think that is correct... I didn't think, I think that rabl should do the "interpretation"

nesquena commented 10 years ago

Glad you got it working but I agree it would be nice if RABL was smart enough to do this translation