Run rubocop on all files
This commit is contained in:
@@ -32,4 +32,4 @@ module Admin
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -16,4 +16,4 @@ module Admin
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -4,13 +4,12 @@ module Admin
|
||||
module Repos
|
||||
class PostRepo < Adamantium::Repo[:posts]
|
||||
def tag_post(post_id:, tag_id:)
|
||||
|
||||
return if posts
|
||||
.post_tags
|
||||
.where(
|
||||
post_id: post_id,
|
||||
tag_id: tag_id
|
||||
).count > 0
|
||||
.post_tags
|
||||
.where(
|
||||
post_id: post_id,
|
||||
tag_id: tag_id
|
||||
).count > 0
|
||||
|
||||
posts
|
||||
.post_tags
|
||||
@@ -64,4 +63,4 @@ module Admin
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -1,7 +1,6 @@
|
||||
module Admin
|
||||
module Repos
|
||||
class PostTagRepo < Adamantium::Repo[:post_tags]
|
||||
|
||||
def merge_tags(target_id:, source_id:)
|
||||
post_tags.where(tag_id: source_id).update(tag_id: target_id)
|
||||
end
|
||||
|
@@ -6,6 +6,7 @@ module Admin
|
||||
.order(Sequel.function(:lower, :label))
|
||||
.to_a
|
||||
end
|
||||
|
||||
def list_with_posts
|
||||
tags
|
||||
.combine(:posts)
|
||||
|
Reference in New Issue
Block a user