Skip to content

Instantly share code, notes, and snippets.

@braidn
Created November 5, 2013 03:46
Show Gist options
  • Save braidn/7313566 to your computer and use it in GitHub Desktop.
Save braidn/7313566 to your computer and use it in GitHub Desktop.
module Extensions
module Spree
module ProductsController
extend ActiveSupport::Concern
include do
alias_method_chain :accurate_title, :meta_title
end
def accurate_title_with_meta_title
return false if !@product
@product.meta_title.present? ? @product.meta_title : accurate_title_without_meta_title
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment