Sha256: 564032aa777d98c3fdccfa025fc7d6b0c766f86cdcaf31c4f17737250751ce79

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

module Refinery
  module PermittedAttributes
    ATTRIBUTES = [
      :image_attributes,
      :page_attributes,
      :page_part_attributes,
      :resource_attributes,
      :blog_post_attributes,
      :inquiries_inquiry_attributes
    ]

    mattr_reader *ATTRIBUTES

    @@image_attributes = [
      { image: [] }, :image_size, :image_title, :image_alt
    ]

    @@page_attributes = [
      :browser_title, :draft, :link_url, :menu_title, :meta_description,
      :parent_id, :skip_to_first_child, :show_in_menu, :title, :view_template,
      :layout_template, :custom_slug, parts_attributes: [:id, :title, :slug, :body, :position]
    ]

    @@page_part_attributes = [
      :title, :slug, :body, :locale
    ]

    @@resource_attributes = [
      :resource_title, { file: [] }
    ]

    @@blog_post_attributes = [
      :title, :body, :custom_teaser, :tag_list,
      :draft, :published_at, :custom_url, :user_id, :username, :browser_title,
      :meta_description, :source_url, :source_url_title, category_ids: []
    ]

    @@inquiries_inquiry_attributes = [:name, :phone, :message, :email]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refinerycms-api-1.0.0.beta lib/refinery/permitted_attributes.rb