Permalink
Browse files

We don't need to override element_name in Resource

That's a legacy method from the 37Signals wrapper and i'm not sure why it was there. It doesn't seem to affect rails < 3 (the method is ignored) but it affects rails >= 3 when the name of the resource in the API is different than the name of the class, for example Basecamp::Message that should use "post" as the resource name in the API calls.
  • Loading branch information...
1 parent 0becd3f commit 7e67411a847c9bf921e3c8fe489110fbc0dfa53e @anibalcucco committed Jan 27, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −4 lib/basecamp/resource.rb
View
@@ -4,10 +4,6 @@ def parent_resources(*parents)
@parent_resources = parents
end
- def element_name
- name.split(/::/).last.underscore
- end
-
def prefix_source
if @parent_resources
@parent_resources.map { |resource| "/#{resource.to_s.pluralize}/:#{resource}_id" }.join + '/'

0 comments on commit 7e67411

Please sign in to comment.