Skip to content

Commit

Permalink
Split the name of the class, not the actual constant
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed Feb 12, 2016
1 parent 51fd736 commit 899e15d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miasma/utils/api_methoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module ApiMethoding
# a given action
def api_method_for(action)
klass = self.respond_to?(:model) ? model : self.class
m_name = "#{Bogo::Utility.snake(klass.split('::').last)}_#{action}"
m_name = "#{Bogo::Utility.snake(klass.name.split('::').last)}_#{action}"
self.api.respond_to?(m_name) ? m_name : nil
end

Expand Down

0 comments on commit 899e15d

Please sign in to comment.