Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove everything that was relalted to meta_keywords. #2053

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/app/views/refinery/_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
<title><%= browser_title(yield(:title)) %></title>
<%= raw %(<meta name="description" content="#{@meta.meta_description}" />) if @meta.meta_description.present? -%>
<%= raw %(<meta name="keywords" content="#{@meta.meta_keywords}">) if @meta.meta_keywords.present? -%>
<%= raw %(<link rel="canonical" content="#{@canonical}" />) if @canonical.present? -%>
<%= csrf_meta_tags if Refinery::Core.authenticity_token_on_frontend -%>
<%= yield :meta %>
Expand Down
3 changes: 1 addition & 2 deletions core/lib/refinery/base_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ class BasePresenter
:title => proc { |p| (p.model.class.name.titleize if p.model.present?) },
:path => proc { |p| p.title },
:browser_title => nil,
:meta_description => nil,
:meta_keywords => nil
:meta_description => nil
}

attr_reader :model
Expand Down
6 changes: 3 additions & 3 deletions pages/app/models/refinery/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Page < Core::BaseModel

class Translation
is_seo_meta
attr_accessible :browser_title, :meta_description, :meta_keywords, :locale
attr_accessible :browser_title, :meta_description, :locale
end

attr_accessible :title
Expand All @@ -23,7 +23,7 @@ class Translation
seo_fields = ::SeoMeta.attributes.keys.map{|a| [a, :"#{a}="]}.flatten
delegate(*(seo_fields << {:to => :translation}))

attr_accessible :id, :deletable, :link_url, :menu_match, :meta_keywords,
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,
Expand All @@ -44,7 +44,7 @@ class Translation
:scope => :parent

# Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
acts_as_indexed :fields => [:title, :meta_keywords, :meta_description,
acts_as_indexed :fields => [:title, :meta_description,
:menu_title, :browser_title, :all_page_part_content]

has_many :parts,
Expand Down
17 changes: 0 additions & 17 deletions pages/spec/models/refinery/page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,6 @@ def turn_on_marketable_urls

context 'meta data' do
context 'responds to' do
it 'meta_keywords' do
page.respond_to?(:meta_keywords)
end

it 'meta_description' do
page.respond_to?(:meta_description)
end
Expand All @@ -340,11 +336,6 @@ def turn_on_marketable_urls
end

context 'allows us to assign to' do
it 'meta_keywords' do
page.meta_keywords = 'Some, great, keywords'
page.meta_keywords.should == 'Some, great, keywords'
end

it 'meta_description' do
page.meta_description = 'This is my description of the page for search results.'
page.meta_description.should == 'This is my description of the page for search results.'
Expand All @@ -357,14 +348,6 @@ def turn_on_marketable_urls
end

context 'allows us to update' do
it 'meta_keywords' do
page.meta_keywords = 'Some, great, keywords'
page.save

page.reload
page.meta_keywords.should == 'Some, great, keywords'
end

it 'meta_description' do
page.meta_description = 'This is my description of the page for search results.'
page.save
Expand Down