-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from true-runes/development
v1.3.0
- Loading branch information
Showing
9 changed files
with
50 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
app/controllers/result_illustration_applications_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
class ResultIllustrationApplicationsController < ApplicationController | ||
def index | ||
application_character_names = OnRawSheetResultIllustrationTotalling.order(character_name_for_public: :asc).pluck(:character_name_for_public) | ||
|
||
render json: application_character_names.to_json | ||
@application_character_names = OnRawSheetResultIllustrationTotalling.order(character_name_for_public: :asc).pluck(:character_name_for_public) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Presenter | ||
class UniteAttacks | ||
# いったん愚直に | ||
def self.character_names(attack) | ||
character_names = attack.chara_1 | ||
character_names = "#{character_names}&#{attack.chara_2}" if attack.chara_2.present? | ||
character_names = "#{character_names}&#{attack.chara_3}" if attack.chara_3.present? | ||
character_names = "#{character_names}&#{attack.chara_4}" if attack.chara_4.present? | ||
character_names = "#{character_names}&#{attack.chara_5}" if attack.chara_5.present? | ||
character_names = "#{character_names}&#{attack.chara_6}" if attack.chara_6.present? | ||
|
||
character_names | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.merge! @application_character_names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
json.array! @attacks do |attack| | ||
json.id attack.id | ||
json.name attack.name | ||
json.kana attack.kana | ||
json.name_en attack.name_en | ||
json.chara_1 attack.chara_1 | ||
json.chara_2 attack.chara_2 | ||
json.chara_3 attack.chara_3 | ||
json.chara_4 attack.chara_4 | ||
json.chara_5 attack.chara_5 | ||
json.chara_6 attack.chara_6 | ||
json.page_annotation attack.page_annotation | ||
json.characters Presenter::UniteAttacks.character_names(attack) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.merge! @attacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Rails.application.routes.draw do | ||
get 'health_check', to: 'health_check#index' | ||
get 'unite_attacks', to: 'unite_attacks#index' | ||
get 'result_illustration_applications', to: 'result_illustration_applications#index' | ||
get 'health_check', to: 'health_check#index', format: 'json' | ||
get 'unite_attacks', to: 'unite_attacks#index', format: 'json' | ||
get 'result_illustration_applications', to: 'result_illustration_applications#index', format: 'json' | ||
end |