Module: Simplec

Defined in:
app/models/simplec/page.rb,
lib/simplec.rb,
lib/simplec/engine.rb,
lib/simplec/version.rb,
app/models/simplec/subdomain.rb,
lib/simplec/action_view/helper.rb,
app/jobs/simplec/application_job.rb,
app/models/simplec/embedded_image.rb,
app/constraints/simplec/subdomains.rb,
lib/simplec/embedded_image_actions.rb,
app/models/simplec/application_record.rb,
app/helpers/simplec/application_helper.rb,
app/mailers/simplec/application_mailer.rb,
app/controllers/simplec/pages_controller.rb,
lib/simplec/action_controller/extensions.rb,
app/controllers/simplec/application_controller.rb

Overview

Simplec::Page

This class represents a page in the system.

Each page has a class located in:

app/models/page/NAME.html.erb

Each page has a partial template in:

app/views/pages/_NAME.html.erb

Where NAME is the demodulized, snake-case name of the Page Subclasss. For
example:

  class Page::Home < Page
    field :h1
  end

Would live in app/models/page/home.html.erb and have a template in
app/views/pages/_home.html.erb.

Each page has the following attributes by default:
  - page.title

Read the documentation below for the class method .field, it is the most used method.

Defined Under Namespace

Modules: ActionController, ActionView, ApplicationHelper, EmbeddedImageActions Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, EmbeddedImage, Engine, Page, PagesController, Subdomain, Subdomains

Constant Summary collapse

VERSION =
'0.1.2'