Class: Lcms::Engine::SearchResourceSerializer
- Inherits:
-
ResourceSerializer
- Object
- ActiveModel::Serializer
- ResourceSerializer
- Lcms::Engine::SearchResourceSerializer
- Defined in:
- app/serializers/lcms/engine/search_resource_serializer.rb
Instance Method Summary collapse
-
#initialize(obj, opts = {}) ⇒ SearchResourceSerializer
constructor
A new instance of SearchResourceSerializer.
Methods inherited from ResourceSerializer
#breadcrumb_title, #grade, #is_assessment, #is_foundational, #is_opr, #is_prerequisite, #path, #type
Methods included from ResourceHelper
#back_to_resource_path, #copyrights_text, #download_per_category_limit, #prerequisites_standards, #resource_breadcrumbs_with_links, #show_resource_path, #type_name
Constructor Details
#initialize(obj, opts = {}) ⇒ SearchResourceSerializer
Returns a new instance of SearchResourceSerializer.
6 7 8 9 |
# File 'app/serializers/lcms/engine/search_resource_serializer.rb', line 6 def initialize(obj, opts = {}) super self.object = Resource.tree.find_by(id: object.model_id) end |