forked from e621ng/e621ng
rubocop
This commit is contained in:
parent
b728c0188d
commit
6051f187ea
@ -51,7 +51,7 @@ class PostsDecorator < ApplicationDecorator
|
|||||||
status_flags << 'F' if post.is_flagged?
|
status_flags << 'F' if post.is_flagged?
|
||||||
|
|
||||||
title = t.tag.span(post.title, class: "post-score-title")
|
title = t.tag.span(post.title, class: "post-score-title")
|
||||||
title = title + t.tag.br if post.title.present?
|
title += t.tag.br if post.title.present?
|
||||||
post_score_icon = "#{'↑' if post.score > 0}#{'↓' if post.score < 0}#{'↕' if post.score == 0}"
|
post_score_icon = "#{'↑' if post.score > 0}#{'↓' if post.score < 0}#{'↕' if post.score == 0}"
|
||||||
score = t.tag.span("#{post_score_icon}#{post.score}", class: "post-score-score #{score_class(post.score)}")
|
score = t.tag.span("#{post_score_icon}#{post.score}", class: "post-score-score #{score_class(post.score)}")
|
||||||
favs = t.tag.span("♥#{post.fav_count}", class: "post-score-faves")
|
favs = t.tag.span("♥#{post.fav_count}", class: "post-score-faves")
|
||||||
|
@ -19,7 +19,7 @@ Rails.application.configure do
|
|||||||
policy.font_src :self
|
policy.font_src :self
|
||||||
policy.img_src :self, :data, 'static1.e621.net', 'static1.e926.net', 'ads.dragonfru.it'
|
policy.img_src :self, :data, 'static1.e621.net', 'static1.e926.net', 'ads.dragonfru.it'
|
||||||
policy.child_src :none
|
policy.child_src :none
|
||||||
#policy.form_action :self, 'discord.e621.net', 'discord.com'
|
# policy.form_action :self, 'discord.e621.net', 'discord.com'
|
||||||
# Specify URI for violation reports
|
# Specify URI for violation reports
|
||||||
# policy.report_uri "/csp-violation-report-endpoint"
|
# policy.report_uri "/csp-violation-report-endpoint"
|
||||||
end
|
end
|
||||||
|
@ -454,8 +454,8 @@ Rails.application.routes.draw do
|
|||||||
get "/static/takedown" => "static#takedown", as: "takedown_static"
|
get "/static/takedown" => "static#takedown", as: "takedown_static"
|
||||||
get "/static/terms_of_service" => "static#terms_of_service", :as => "terms_of_service"
|
get "/static/terms_of_service" => "static#terms_of_service", :as => "terms_of_service"
|
||||||
get "/static/contact" => "static#contact", :as => "contact"
|
get "/static/contact" => "static#contact", :as => "contact"
|
||||||
#get "/static/discord" => "static#discord", as: "discord_get"
|
# get "/static/discord" => "static#discord", as: "discord_get"
|
||||||
#post "/static/discord" => "static#discord", as: "discord_post"
|
# post "/static/discord" => "static#discord", as: "discord_post"
|
||||||
get "/static/toggle_mobile_mode" => "static#disable_mobile_mode", as: "disable_mobile_mode"
|
get "/static/toggle_mobile_mode" => "static#disable_mobile_mode", as: "disable_mobile_mode"
|
||||||
get "/static/theme" => "static#theme", as: "theme"
|
get "/static/theme" => "static#theme", as: "theme"
|
||||||
get "/static/avoid_posting" => "static#avoid_posting", as: "avoid_posting_static"
|
get "/static/avoid_posting" => "static#avoid_posting", as: "avoid_posting_static"
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
class AddTitleToPosts < ActiveRecord::Migration[7.1]
|
class AddTitleToPosts < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
add_column(:posts, :title, :text, null: false, default: '')
|
add_column(:posts, :title, :text, null: false, default: "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
class AddTitleToUploads < ActiveRecord::Migration[7.1]
|
class AddTitleToUploads < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
add_column(:uploads, :title, :text, null: false, default: '')
|
add_column(:uploads, :title, :text, null: false, default: "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class UpdatePostsTriggerChangeSeq < ActiveRecord::Migration[7.1]
|
class UpdatePostsTriggerChangeSeq < ActiveRecord::Migration[7.1]
|
||||||
def up
|
def up
|
||||||
execute <<-SQL
|
execute <<-SQL.squish
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION public.posts_trigger_change_seq() RETURNS trigger
|
CREATE OR REPLACE FUNCTION public.posts_trigger_change_seq() RETURNS trigger
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
@ -20,7 +20,7 @@ class UpdatePostsTriggerChangeSeq < ActiveRecord::Migration[7.1]
|
|||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
execute <<-SQL
|
execute <<-SQL.squish
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION public.posts_trigger_change_seq() RETURNS trigger
|
CREATE OR REPLACE FUNCTION public.posts_trigger_change_seq() RETURNS trigger
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
|
Loading…
Reference in New Issue
Block a user