Description
Returns a symbol out of the subject model name(plural)
Tip
Override this method to get another root for params and JSON responses.
Used in
Use
Example
class BooksController < ApplicationController
include RestingPug::Base
private
# Override a subject_model_sym_plural to use :novels as a symbol used in index action
def subject_model_sym_plural
:novels
end
end
Source code
# lib/resting_pug/subject.rb
def subject_model_sym_plural
subject_model.to_s.pluralize.underscore.to_sym
end