Skip to content

Commit

Permalink
[DEMAD-101] Correcciones
Browse files Browse the repository at this point in the history
Correcciones
  • Loading branch information
ajmorenoh committed Nov 25, 2020
1 parent f1b6ce4 commit da08746
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@ def management_controller?
controller.class.to_s.include?("Management")
end

def host_helper
root_url
end

end
2 changes: 1 addition & 1 deletion app/views/mailer/newsletter.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<td style="padding-bottom: 20px; padding-left: 10px;">
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;line-height: 24px;">
<%= safe_html_with_links @newsletter.body.html_safe %>
<%= safe_html_with_links @newsletter.body.gsub(/\/system\/ckeditor_assets\/pictures/,"#{host_helper}system/ckeditor_assets/pictures").html_safe %>
</p>
</td>
10 changes: 10 additions & 0 deletions db/migrate/20201125101402_add_grant_moderated_contents.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class AddGrantModeratedContents < ActiveRecord::Migration[5.0]
def change
if !Rails.env.development? && !Rails.env.text?
execute "ALTER TABLE moderated_contents
OWNER TO participacion_owner;
GRANT ALL ON TABLE moderated_contents TO participacion_owner;
GRANT SELECT ON TABLE moderated_contents TO participacion_read;"
end
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20201120071038) do
ActiveRecord::Schema.define(version: 20201125101402) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down

0 comments on commit da08746

Please sign in to comment.