Skip to content

Liquid error: internal #5

@vishal5963

Description

@vishal5963

Hello
I am trying to send an email using the template store in the database. The email is being send successfully but in email I am getting following error:

Liquid error: internal

The content in database record is <div>{{ user.name }}</div>.
Following is my mailer:

class UserMailer < ApplicationMailer
prepend_view_path TemplateStorage.resolver

def welcome(user)
@user = user.attributes
@stored_template = TemlateStorage.where(template_name: "welcome_user").last
mail(to: user.email, subject: "Welcome to our website")
end
end

Following is the content of my model:

require 'liquid_markdown/resolver' # required

class TemplateStorage < ApplicationRecord
attribute :handler, :string, default: 'liqmd'
attribute :format, :string, default: 'html'
attribute :path, :string, default: '/'
store_templates
def self.resolver(options={})
LiquidMarkdown::Resolver.using self, options
end
end

Following is the error that I am getting:

Screenshot 2020-04-28 at 5 01 06 PM

I am not sure where am I going wrong with the steps mentioned in the Readme file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions