Module | Cms::Behaviors::ClassMethods |
In: |
lib/cms/behaviors/rendering.rb
|
# File lib/cms/behaviors/rendering.rb, line 67 67: def helper_class 68: "Cms::#{name}Helper".constantize 69: end
# File lib/cms/behaviors/rendering.rb, line 63 63: def helper_path 64: "app/helpers/cms/#{name.underscore}_helper.rb" 65: end
This will be the used as the name of instance variable that will be available in the view. The default value is "@renderable"
# File lib/cms/behaviors/rendering.rb, line 59 59: def instance_variable_name_for_view 60: @instance_variable_name_for_view ||= "@renderable" 61: end
Instance variables that will not be copied from the renderable to the view
# File lib/cms/behaviors/rendering.rb, line 79 79: def ivars_to_ignore 80: ['@controller', '@_already_rendered'] 81: end
This is where the path to the template. The default is based on the class of the renderable, so if you have an Article that is renderable, the template will be "articles/render"
# File lib/cms/behaviors/rendering.rb, line 74 74: def template_path 75: "cms/#{name.underscore.pluralize}/render" 76: end