Skip to content

Commit

Permalink
Dynamically set attr_accessible for all defined SeoMeta attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed Jun 1, 2013
1 parent 356e4dc commit 717b950
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/app/models/refinery/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Page < Core::BaseModel

class Translation
is_seo_meta
attr_accessible :browser_title, :meta_description, :locale
attr_accessible *::SeoMeta.attributes.keys, :locale
end

# Delegate SEO Attributes to globalize3 translation
Expand All @@ -19,9 +19,9 @@ class Translation

attr_accessible :id, :deletable, :link_url, :menu_match,
:skip_to_first_child, :position, :show_in_menu, :draft,
:parts_attributes, :browser_title, :meta_description,
:parent_id, :menu_title, :page_id, :layout_template,
:view_template, :custom_slug, :slug, :title
:parts_attributes, :parent_id, :menu_title, :page_id,
:layout_template, :view_template, :custom_slug, :slug,
:title, *::SeoMeta.attributes.keys

validates :title, :presence => true

Expand Down

0 comments on commit 717b950

Please sign in to comment.