Module: SocialStream::Controllers::Helpers::ClassMethods

Defined in:
lib/social_stream/controllers/helpers.rb

Instance Method Summary collapse

Instance Method Details

#model_classObject

Get the class relative to controller name

Post #=> in PostsController


19
20
21
# File 'lib/social_stream/controllers/helpers.rb', line 19

def model_class
  self.name.sub(/Controller/, '').singularize.constantize
end