Thursday 27 August 2020

Generate Dynamic File with Content in rails

 EmailTemplate.where("locale = 'de'").each do |et|

 body = et.body

 File.open("templates/#{et.slug}.html", 'w+') {|f| f.write(body) }

end

No comments:

Post a Comment

Revert last commit or second last and more....

 Git revert commit_id -m 1 this command willl revert last commit  Git revert commit_id -m 2 this command will revert second commit with same...