Reputation: 17
How to save a HTML page in database using ruby?
I want to save several records in seed.rb `EmailEvent.create(email_event_id: 1, description:
"contact_agent_notification", html_page:"html page goes here"`
I am not sure whether this is the right approach for this or not. Any help will be appreciated.
Upvotes: 0
Views: 5672
Reputation: 705
<%= email_event.html_page.html_safe %>
)As spickermann says, though, other than that things are pretty straightforward.
Upvotes: 4