lib/janus/controllers/internal_helpers.rb in janus-0.7.0 vs lib/janus/controllers/internal_helpers.rb in janus-0.8.0

- old
+ new

@@ -30,16 +30,23 @@ # as detected by janus_scope. def resource=(value) instance_variable_set(:"@#{janus_scope}", value) end - # Returns the `User` class (or `Admin` or whatever) as detected by janus_scope. + # Returns the `User` class (or `Admin` or whatever) as detected by + # janus_scope. def resource_class @resource_class ||= janus_scope.camelize.constantize end # Alias for janus_scope. def resource_name janus_scope + end + + # Returns the `UserMailer` class (or `AdminMailer` or whatever) as detected + # by janus_scope. + def mailer_class + @mailer_class ||= (janus_scope.camelize + 'Mailer').constantize end end end