lib/rows/model.rb in rows_controller-3.0.5 vs lib/rows/model.rb in rows_controller-3.1.0
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
module Rows::Model
def model_class
@_model_class ||= self.class.model_class ||
- Kernel.const_get(params[:controller].classify)
+ Kernel.const_get(params[:controller].classify)
end
if Rails::VERSION::MAJOR > 3
def model_name
@_model_name ||= model_class.model_name.name
@@ -18,10 +18,10 @@
def model_name
@_model_name ||= model_class.name
end
def model_symbol
- @_model_symbol ||= model_name.underscore.tr('/', '_')
+ @_model_symbol ||= model_name.underscore.tr("/", "_")
end
end
def model_symbol_plural
@_model_symbol_plural ||= model_symbol.pluralize