Module: RailsAdminContentBuilder::ContentBuilderHelpers
- Defined in:
- app/helpers/rails_admin_content_builder/content_builder_helpers.rb
Overview
This is a Module
Instance Method Summary collapse
-
#all_contents_created ⇒ Object
Return all contents created.
-
#content_created ⇒ Object
Return content Object.
-
#find_content_created_by_slug(slug) ⇒ Object
Return specific contents created by slug.
-
#set_content_builder ⇒ Object
Return object RailsAdminContentBuilder::ContentBuilder.
Instance Method Details
#all_contents_created ⇒ Object
Return all contents created
@content = all_contents_created
22 23 24 |
# File 'app/helpers/rails_admin_content_builder/content_builder_helpers.rb', line 22 def all_contents_created set_content_builder.where(status: true) end |
#content_created ⇒ Object
Return content Object
@content = content_created
15 16 17 |
# File 'app/helpers/rails_admin_content_builder/content_builder_helpers.rb', line 15 def content_created set_content_builder end |
#find_content_created_by_slug(slug) ⇒ Object
Return specific contents created by slug
@content = find_content_created_by_slug('slug')
29 30 31 |
# File 'app/helpers/rails_admin_content_builder/content_builder_helpers.rb', line 29 def find_content_created_by_slug(slug) set_content_builder.where(status: true, slug: slug).first end |
#set_content_builder ⇒ Object
Return object RailsAdminContentBuilder::ContentBuilder
34 35 36 |
# File 'app/helpers/rails_admin_content_builder/content_builder_helpers.rb', line 34 def set_content_builder RailsAdminContentBuilder::ContentBuilder end |