unixcharles/refinerycms-copywriting

copywriting breaks page preview

Opened this issue · 1 comments

When editing a page whose view template uses the copywriting helper, any attempt to use Refinery's "Preview" function fails with the following error:

NoMethodError in Refinery/pages/admin/preview#show

Showing [path-to-my-app]/refinery-sandbox/app/views/refinery/pages/show.html.erb where line #1 raised:

undefined method `copywriting' for #<#<Class:0x007ff1d01a6c28>:0x007ff1c9609010>
Extracted source (around line #1):

1: <% test_phrase = copywriting("Test Phrase", { :page => @page, :scope => "Test", :phrase_type => 'string', :default => 'foo' }) %>
2: 
3: <%= test_phrase %>
4: 

I ran into this as well. A workaround is to include the helper from copywriting into your application helper:

module ApplicationHelper
  include Refinery::Copywriting::CopywritingHelper