-
Notifications
You must be signed in to change notification settings - Fork 6
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
GO-83 Save templates MessageDraft content to HTML visualization in order to be searchable #479
GO-83 Save templates MessageDraft content to HTML visualization in order to be searchable #479
Conversation
app/models/message_draft.rb
Outdated
@@ -70,6 +70,7 @@ class MessageDraft < Message | |||
|
|||
def update_content(parameters) | |||
metadata["data"] = parameters.to_h | |||
self.html_visualization = format_html_visualization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto mi pride podozrive. preco sa to nedeje v tom build_message_from_template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pravda, nebolo to tuto spravne, presunula som.
78c940b
to
8dfb31c
Compare
@@ -106,6 +106,10 @@ def build_message_from_template(message) | |||
filled_content.gsub!(template_item[:placeholder], message.metadata['data'][template_item[:name]].to_s) | |||
end | |||
|
|||
message.update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Na tejto metode sa mi mierne nepozdava, ze build
robi vlastne create. Za normalnych okolnosti by to malo byt len vytvorenie do pamate bez ulozenia do db, ale asi tomu nieco brani lebo aj vyssie sa to deje.
#458