-
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.
- Loading branch information
Showing
19 changed files
with
167 additions
and
340 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
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,19 +1,5 @@ | ||
class EnchantsController < ApplicationController | ||
before_action :set_enchant, only: :show | ||
|
||
def index | ||
@enchants = Enchant.all | ||
@enchants = Enchant.all.load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_enchant | ||
@enchant = Enchant.find(params[:id]) | ||
end | ||
|
||
def enchant_params | ||
params.require(:enchant).permit(:name, :tier, :type) | ||
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 |
---|---|---|
@@ -1,22 +1,8 @@ | ||
class GearsController < ApplicationController | ||
before_action :set_gear, only: :show | ||
|
||
def index | ||
@roles = Role.order('id ASC').load_async | ||
@chars = Char.order('name ASC').load_async | ||
@gears = Gear.order('id ASC').load_async | ||
@skills = Skill.where('length(parent_id) > 4').load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_gear | ||
@gear = Gear.find(params[:id]) | ||
end | ||
|
||
def gear_params | ||
params.require(:gear).permit(:name, :description, :tier, :set, :gear_type, :gear_skill) | ||
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 |
---|---|---|
@@ -1,19 +1,6 @@ | ||
class PerksController < ApplicationController | ||
before_action :set_perk, only: :show | ||
|
||
def index | ||
@roles = Role.all.load_async | ||
@perks = Perk.all.load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_perk | ||
@perk = Perk.find(params[:id]) | ||
end | ||
|
||
def perk_params | ||
params.require(:perk).permit(:name, :description, :tier, :sequence, :perk_type) | ||
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 |
---|---|---|
@@ -1,20 +1,6 @@ | ||
class RolesController < ApplicationController | ||
before_action :set_role, only: :show | ||
|
||
def index | ||
@roles = Role.all.load_async | ||
@stats = Stat.all.load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_role | ||
@role = Role.friendly.find(params[:id]) | ||
end | ||
|
||
def role_params | ||
params.require(:role).permit(:name) | ||
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 |
---|---|---|
@@ -1,18 +1,5 @@ | ||
class RunesController < ApplicationController | ||
before_action :set_rune, only: :show | ||
def index | ||
@runes = Rune.where(tier: ['Legendary', 'Velkazar']).load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_rune | ||
@rune = Rune.find(params[:id]) | ||
end | ||
|
||
def rune_params | ||
params.require(:rune).permit(:name, :value, :type_gear, :tier) | ||
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 |
---|---|---|
@@ -1,20 +1,6 @@ | ||
class SkillsController < ApplicationController | ||
before_action :set_skill, only: :show | ||
|
||
def index | ||
@chars = Char.order('name ASC').load_async | ||
@skills = Skill.order('skill_number ASC').load_async | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_skill | ||
@skill = Skill.find(params[:id]) | ||
end | ||
|
||
def skill_params | ||
params.require(:skill).permit(:name, :description, :mana, :cooldown, :skill_number) | ||
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 |
---|---|---|
@@ -1,19 +1,5 @@ | ||
class StatsController < ApplicationController | ||
before_action :set_stat, only: :show | ||
|
||
def index | ||
@stats = Stat.all | ||
end | ||
|
||
def show | ||
end | ||
|
||
private | ||
def set_stat | ||
@stat = Stat.find(params[:id]) | ||
end | ||
|
||
def stat_params | ||
params.require(:stat).permit(:name, :value, :stat_type, :notice) | ||
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 |
---|---|---|
@@ -1,52 +1,11 @@ | ||
title Hero | ||
|
||
.main | ||
.h-title | ||
img src='/images/media/classes/knight.webp' alt='Knight' | ||
span Knight | ||
.h-heroes | ||
- @knight.each do |k| | ||
= link_to k, title: k.name do | ||
img src='/images/media/heroes/#{k.name.downcase}/portrait.webp' alt=k.name | ||
.h-title | ||
img src='/images/media/classes/warrior.webp' alt='Warrior' | ||
span Warrior | ||
.h-heroes | ||
- @warrior.each do |w| | ||
= link_to w, title: w.name do | ||
img src='/images/media/heroes/#{w.name.downcase}/portrait.webp' alt=w.name | ||
.h-title | ||
img src='/images/media/classes/assassin.webp' alt='Assassin' | ||
span Assassin | ||
.h-heroes | ||
- @assassin.each do |a| | ||
= link_to a, title: a.name do | ||
img src='/images/media/heroes/#{a.name.downcase}/portrait.webp' alt=a.name | ||
.h-title | ||
img src='/images/media/classes/archer.webp' alt='Archer' | ||
span Archer | ||
.h-heroes | ||
- @archer.each do |a| | ||
= link_to a, title: a.name do | ||
img src='/images/media/heroes/#{a.name.downcase}/portrait.webp' alt=a.name | ||
.h-title | ||
img src='/images/media/classes/mechanic.webp' alt='Mechanic' | ||
span Mechanic | ||
.h-heroes | ||
- @mechanic.each do |m| | ||
= link_to m, title: m.name do | ||
img src='/images/media/heroes/#{m.name.downcase}/portrait.webp' alt=m.name | ||
.h-title | ||
img src='/images/media/classes/wizard.webp' alt='Wizard' | ||
span Wizard | ||
.h-heroes | ||
- @wizard.each do |w| | ||
= link_to w, title: w.name do | ||
img src='/images/media/heroes/#{w.name.downcase}/portrait.webp' alt=w.name | ||
.h-title | ||
img src='/images/media/classes/priest.webp' alt='Priest' | ||
span Priest | ||
.h-heroes | ||
- @priest.each do |p| | ||
= link_to p, title: p.name do | ||
img src='/images/media/heroes/#{p.name.downcase}/portrait.webp' alt=p.name | ||
- @roles.each do |role| | ||
.h-title | ||
= image_tag "/images/media/classes/#{role.name.downcase}.webp", alt: role.name | ||
span #{role.name} | ||
.h-heroes | ||
- @chars.where(role_id: role.id).each do |char| | ||
= link_to char, title: char.name do | ||
= image_tag "/images/media/heroes/#{char.name.downcase}/portrait.webp", alt: char.name |
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
Oops, something went wrong.