Skip to content

Instantly share code, notes, and snippets.

@gdavis

gdavis/_form.html.erb

Last active Dec 10, 2015
Embed
What would you like to do?
<%= semantic_form_for [ :manage, resource ], :html => {:class => 'default-manage-form' } do |f| %>
<%= f.inputs do %>
<% attributes.each do |attr| %>
<% puts attr %>
<% case attr %>
<% when "q" %>
<% puts resource[attr] %>
<%= f.input :q, :selected => resource[attr], :collection => Ability.all, :include_blank => false %>
<% when "w" %>
<% puts resource[attr] %>
<%= f.input :w, :selected => resource[attr], :collection => Ability.all, :include_blank => false %>
<% when "e" %>
<% puts resource[attr] %>
<%= f.input :e, :selected => resource[attr], :collection => Ability.all, :include_blank => false %>
<% when "r" %>
<% puts resource[attr] %>
<%= f.input :r, :selected => resource[attr], :collection => Ability.all, :include_blank => false %>
<% when "passive" %>
<% puts resource[attr] %>
<%= f.input :passive, :selected => resource[attr], :collection => Ability.all, :include_blank => false %>
<% else %>
<%= f.input attr.to_sym %>
<% end %>
<% end %>
<%= f.actions do %>
<%= f.action :submit %>
<% end %>
<% end %>
<% end %>
class Ability < ActiveRecord::Base
attr_accessible :ability_description,
:cost,
:effect,
:cooldown,
:range,
:name,
:icon,
:champion_id
has_one :champion
end
class Manage::ApplicationController < ActionController::Base
protect_from_forgery
if Rails.application.config.basic_auth
user, password = Rails.application.config.basic_auth.split(':')
http_basic_authenticate_with :name => user, :password => password
end
def create
super create
if Rails.cache.exist? "Application/all"
puts "Resetting cache after create"
Rails.cache.delete "Application/all"
end
end
def update
super update
if Rails.cache.exist? "Application/all"
puts "Resetting cache after update"
Rails.cache.delete "Application/all"
end
end
def delete
super delete
if Rails.cache.exist? "Application/all"
puts "Resetting cache after delete"
Rails.cache.delete "Application/all"
end
end
end
class Champion < ActiveRecord::Base
attr_accessible :champion_id,
:name,
:title,
:icon,
:image,
:lore,
:damage,
:damage_modifier,
:health,
:health_modifier,
:mana,
:mana_modifier,
:move_speed,
:armor,
:armor_modifier,
:spell_block,
:spell_block_modifier,
:health_regen,
:health_regen_modifier,
:mana_regen,
:mana_regen_modifier,
:recommended_classic_items,
:recommended_dominion_items,
:tips,
:tags,
:abilities,
:attack_damage_rating,
:health_rating,
:ability_power_rating,
:difficulty_rating,
:ip_cost,
:rp_cost,
:spotlight_video,
:free,
:release_date,
:ultimate_type,
:crit,
:crit_modifier,
:attack_range,
:attack_speed_offset,
:attack_speed_modifier,
:q,
:w,
:e,
:r,
:passive
belongs_to :q, :class_name => "Ability", :foreign_key => "q"
belongs_to :w, :class_name => "Ability", :foreign_key => "w"
belongs_to :e, :class_name => "Ability", :foreign_key => "e"
belongs_to :r, :class_name => "Ability", :foreign_key => "r"
belongs_to :passive, :class_name => "Ability", :foreign_key => "passive"
end
class Manage::ChampionsController < Manage::ResourceController
end
<select id="champion_q" name="champion[q]"><option value="1">Orb of Deception</option>
<option value="2">Fox-Fire</option>
<option value="3">Charm</option>
<option value="4">Spirit Rush</option>
<option value="5">Essence Theft</option>
<option value="6">Mark of the Assassin</option>
<option value="7">Twilight Shroud</option>
<option value="8">Crescent Slash</option>
<option value="9">Shadow Dance</option>
<option value="10">Twin Disciplines</option>
<option value="11">Pulverize</option>
<option value="12">Headbutt</option>
<option value="13">Triumphant Roar</option>
<option value="14">Unbreakable Will</option>
<option value="15">Trample</option>
<option value="16">Bandage Toss</option>
<option value="17">Despair</option>
<option value="18">Tantrum</option>
<option value="19">Curse of the Sad Mummy</option>
<option value="20">Cursed Touch</option>
<option value="21">Flash Frost</option>
<option value="22">Crystallize</option>
<option value="23">Frostbite</option>
<option value="24">Glacial Storm</option>
<option value="25">Rebirth</option>
<option value="26">Disintegrate</option>
<option value="27">Incinerate</option>
<option value="28">Molten Shield</option>
<option value="29">Summon: Tibbers</option>
<option value="30">Pyromania</option>
<option value="31">Frost Shot</option>
<option value="32">Volley</option>
<option value="33">Hawkshot</option>
<option value="34">Enchanted Crystal Arrow</option>
<option value="35">Focus</option>
<option value="36">Rocket Grab</option>
<option value="37">Overdrive</option>
<option value="38">Power Fist</option>
<option value="39">Static Field</option>
<option value="40">Mana Barrier</option>
<option value="41">Sear</option>
<option value="42">Pillar of Flame</option>
<option value="43">Conflagration</option>
<option value="44">Pyroclasm</option>
<option value="45">Blaze</option>
<option value="46">Piltover Peacemaker</option>
<option value="47">Yordle Snap Trap</option>
<option value="48">90 Caliber Net</option>
<option value="49">Ace in the Hole</option>
<option value="50">Headshot</option>
<option value="51">Noxious Blast</option>
<option value="52">Miasma</option>
<option value="53">Twin Fang</option>
<option value="54">Petrifying Gaze</option>
<option value="55">Deadly Cadence</option>
<option value="56">Rupture</option>
<option value="125">Grog-Soaked Blade</option>
<option value="57">Feral Scream</option>
<option value="58">Vorpal Spikes</option>
<option value="59">Feast</option>
<option value="60">Carnivore</option>
<option value="61">Phosphorus Bomb</option>
<option value="62">Valkyrie</option>
<option value="63">Gatling Gun</option>
<option value="64">Missile Barrage</option>
<option value="65">Hextech Shrapnel Shells</option>
<option value="66">Decimate</option>
<option value="67">Crippling Strike</option>
<option value="68">Apprehend</option>
<option value="69">Noxian Guillotine</option>
<option value="70">Hemorrhage</option>
<option value="71">Crescent Strike</option>
<option value="72">Pale Cascade</option>
<option value="73">Moonfall</option>
<option value="74">Lunar Rush</option>
<option value="75">Moonsilver Blade</option>
<option value="76">Infected Cleaver</option>
<option value="77">Burning Agony</option>
<option value="78">Masochism</option>
<option value="79">Sadism</option>
<option value="80">Adrenaline Rush</option>
<option value="81">Spinning Axe</option>
<option value="82">Blood Rush</option>
<option value="83">Stand Aside</option>
<option value="84">Whirling Death</option>
<option value="85">Wicked Blades</option>
<option value="86">Neurotoxin / Venomous Bite</option>
<option value="87">Volatile Spiderling / Skittering Frenzy</option>
<option value="88">Cocoon / Rappel</option>
<option value="89">Spider Form</option>
<option value="90">Spider Swarm</option>
<option value="91">Hate Spike</option>
<option value="159">Monsoon</option>
<option value="92">Dark Frenzy</option>
<option value="93">Ravage</option>
<option value="94">Agony's Embrace</option>
<option value="95">Shadow Walk</option>
<option value="96">Mystic Shot</option>
<option value="97">Essence Flux</option>
<option value="98">Arcane Shift</option>
<option value="99">Trueshot Barrage</option>
<option value="100">Rising Spell Force</option>
<option value="101">Terrify</option>
<option value="102">Drain</option>
<option value="103">Dark Wind</option>
<option value="104">Crowstorm</option>
<option value="105">Dread</option>
<option value="106">Lunge</option>
<option value="107">Riposte</option>
<option value="108">Burst of Speed</option>
<option value="160">Tailwind</option>
<option value="109">Blade Waltz</option>
<option value="110">Duelist</option>
<option value="111">Urchin Strike</option>
<option value="112">Seastone Trident</option>
<option value="113">Playful / Trickster</option>
<option value="114">Chum the Waters</option>
<option value="115">Nimble Fighter</option>
<option value="116">Resolute Smite</option>
<option value="117">Bulwark</option>
<option value="118">Righteous Gust</option>
<option value="119">Idol of Durand</option>
<option value="120">Runic Skin</option>
<option value="121">Parrrley</option>
<option value="122">Remove Scurvy</option>
<option value="123">Raise Morale</option>
<option value="124">Cannon Barrage</option>
<option value="126">Decisive Strike</option>
<option value="127">Courage</option>
<option value="128">Judgment</option>
<option value="129">Demacian Justice</option>
<option value="130">Perseverance</option>
<option value="131">Barrel Roll</option>
<option value="132">Drunken Rage</option>
<option value="133">Body Slam</option>
<option value="134">Explosive Cask</option>
<option value="135">Happy Hour</option>
<option value="136">Buckshot</option>
<option value="137">Smoke Screen</option>
<option value="138">Quickdraw</option>
<option value="139">Collateral Damage</option>
<option value="140">True Grit</option>
<option value="141">Rampage</option>
<option value="142">Spirit of Dread</option>
<option value="143">Devastating Charge</option>
<option value="144">Onslaught of Shadows</option>
<option value="145">Warpath</option>
<option value="146">H-28G Evolution Turret</option>
<option value="147">Hextech Micro-Rockets</option>
<option value="148">CH-1 Concussion Grenade</option>
<option value="149">UPGRADE!!!</option>
<option value="150">Techmaturgical Repair Bots</option>
<option value="151">Bladesurge</option>
<option value="152">Hiten Style</option>
<option value="153">Equilibrium Strike</option>
<option value="154">Transcendent Blades</option>
<option value="155">Ionian Fervor</option>
<option value="156">Howling Gale</option>
<option value="157">Zephyr</option>
<option value="158">Eye Of The Storm</option>
<option value="161">Dragon Strike</option>
<option value="162">Golden Aegis</option>
<option value="163">Demacian Standard</option>
<option value="164">Cataclysm</option>
<option value="165">Martial Cadence</option>
<option value="166">Leap Strike</option>
<option value="167">Empower</option>
<option value="168">Counter Strike</option>
<option value="169">Grandmaster's Might</option>
<option value="170">Relentless Assault</option>
<option value="171">To the Skies! / Shock Blast</option>
<option value="172">Shock Blast</option>
<option value="173">Lightning Field / Hyper Charge</option>
<option value="174">Hyper Charge</option>
<option value="175">Thundering Blow / Acceleration Gate</option>
<option value="176">Acceleration Gate</option>
<option value="177">Mercury Cannon</option>
<option value="178">Mercury Hammer</option>
<option value="179">Hextech Capacitor</option>
<option value="180">Heavenly Wave</option>
<option value="181">Spirit Bond</option>
<option value="182">Soul Shield</option>
<option value="183">Mantra</option>
<option value="184">Inner Flame</option>
<option value="185">Lay Waste</option>
<option value="186">Wall of Pain</option>
<option value="187">Defile</option>
<option value="188">Requiem</option>
<option value="189">Death Defied</option>
<option value="190">Null Sphere</option>
<option value="191">Nether Blade</option>
<option value="192">Force Pulse</option>
<option value="193">Riftwalk</option>
<option value="194">Void Stone</option>
<option value="195">Bouncing Blades</option>
<option value="196">Sinister Steel</option>
<option value="197">Shunpo</option>
<option value="198">Death Lotus</option>
<option value="199">Voracity</option>
<option value="200">Reckoning</option>
<option value="201">Divine Blessing</option>
<option value="202">Righteous Fury</option>
<option value="203">Intervention</option>
<option value="204">Holy Fervor</option>
<option value="205">Thundering Shuriken</option>
<option value="206">Electrical Surge</option>
<option value="207">Lightning Rush</option>
<option value="208">Slicing Maelstrom</option>
<option value="209">Mark of the Storm</option>
<option value="224">Mirror Image</option>
<option value="210">Taste Their Fear</option>
<option value="211">Void Spike</option>
<option value="212">Leap</option>
<option value="213">Void Assault</option>
<option value="214">Unseen Threat</option>
<option value="215">Caustic Spittle</option>
<option value="216">Bio-Arcane Barrage</option>
<option value="217">Void Ooze</option>
<option value="218">Living Artillery</option>
<option value="219">Icathian Surprise</option>
<option value="220">Sigil of Silence</option>
<option value="221">Distortion</option>
<option value="222">Ethereal Chains</option>
<option value="223">Mimic</option>
<option value="324">Aegis Protection</option>
<option value="225">Sonic Wave / Resonating Strike</option>
<option value="226">Safeguard / Iron Will</option>
<option value="227">Tempest / Cripple</option>
<option value="228">Dragon's Rage</option>
<option value="229">Flurry</option>
<option value="230">Shield of Daybreak</option>
<option value="231">Eclipse</option>
<option value="232">Zenith Blade</option>
<option value="233">Solar Flare</option>
<option value="234">Sunlight</option>
<option value="235">Glitterlance</option>
<option value="236">Whimsy</option>
<option value="237">Help, Pix!</option>
<option value="238">Wild Growth</option>
<option value="239">Pix, Faerie Companion</option>
<option value="240">Light Binding</option>
<option value="241">Prismatic Barrier</option>
<option value="242">Lucent Singularity</option>
<option value="243">Final Spark</option>
<option value="244">Illumination</option>
<option value="245">Seismic Shard</option>
<option value="246">Brutal Strikes</option>
<option value="247">Ground Slam</option>
<option value="248">Unstoppable Force</option>
<option value="249">Granite Shield</option>
<option value="250">Call of the Void</option>
<option value="251">Null Zone</option>
<option value="252">Malefic Visions</option>
<option value="253">Nether Grasp</option>
<option value="254">Summon Voidling</option>
<option value="255">Arcane Smash</option>
<option value="256">Twisted Advance</option>
<option value="257">Sapling Toss</option>
<option value="258">Vengeful Maelstrom</option>
<option value="259">Sap Magic</option>
<option value="260">Alpha Strike</option>
<option value="261">Meditate</option>
<option value="262">Wuju Style</option>
<option value="263">Highlander</option>
<option value="264">Double Strike</option>
<option value="265">Double Up</option>
<option value="266">Impure Shots</option>
<option value="267">Make It Rain</option>
<option value="268">Bullet Time</option>
<option value="269">Strut</option>
<option value="270">Mace of Spades</option>
<option value="271">Creeping Death</option>
<option value="272">Siphon of Destruction</option>
<option value="273">Children of the Grave</option>
<option value="274">Iron Man</option>
<option value="275">Dark Binding</option>
<option value="276">Tormented Soil</option>
<option value="277">Black Shield</option>
<option value="278">Soul Shackles</option>
<option value="279">Soul Siphon</option>
<option value="280">Aqua Prison</option>
<option value="281">Ebb and Flow</option>
<option value="282">Tidecaller's Blessing</option>
<option value="283">Tidal Wave</option>
<option value="284">Surging Tides</option>
<option value="285">Siphoning Strike</option>
<option value="286">Wither</option>
<option value="287">Spirit Fire</option>
<option value="288">Fury of the Sands</option>
<option value="289">Soul Eater</option>
<option value="290">Dredge Line</option>
<option value="291">Titan's Wrath</option>
<option value="292">Riptide</option>
<option value="293">Depth Charge</option>
<option value="294">Staggering Blow</option>
<option value="295">Javelin Toss / Takedown</option>
<option value="296">Bushwhack / Pounce</option>
<option value="297">Primal Surge / Swipe</option>
<option value="298">Aspect Of The Cougar</option>
<option value="299">Prowl</option>
<option value="300">Duskbringer</option>
<option value="301">Shroud of Darkness</option>
<option value="302">Unspeakable Horror</option>
<option value="303">Paranoia</option>
<option value="304">Umbra Blades</option>
<option value="305">Consume</option>
<option value="306">Blood Boil</option>
<option value="307">Ice Blast</option>
<option value="308">Absolute Zero</option>
<option value="309">Visionary</option>
<option value="310">Undertow</option>
<option value="311">Vicious Strikes</option>
<option value="312">Reckless Swing</option>
<option value="313">Ragnarok</option>
<option value="314">Berserker Rage</option>
<option value="315">Command: Attack</option>
<option value="316">Command: Dissonance</option>
<option value="317">Command: Protect</option>
<option value="318">Command: Shockwave</option>
<option value="319">Clockwork Windup</option>
<option value="320">Spear Shot</option>
<option value="321">Aegis of Zeonia</option>
<option value="322">Heartseeker Strike</option>
<option value="323">Grand Skyfall</option>
<option value="325">Devastating Blow</option>
<option value="326">Paragon of Demacia</option>
<option value="327">Heroic Charge</option>
<option value="328">Diplomatic Immunity</option>
<option value="329">Valiant Fighter</option>
<option value="330">Powerball</option>
<option value="331">Defensive Ball Curl</option>
<option value="332">Puncturing Taunt</option>
<option value="333">Tremors</option>
<option value="334">Spiked Shell</option>
<option value="335">Cull the Meek</option>
<option value="336">Ruthless Predator</option>
<option value="337">Slice and Dice</option>
<option value="338">Dominus</option>
<option value="339">Reign of Anger</option>
<option value="340">Savagery</option>
<option value="341">Battle Roar</option>
<option value="342">Bola Strike</option>
<option value="343">Thrill of the Hunt</option>
<option value="344">Unseen Predator</option>
<option value="345">Broken Wings</option>
<option value="346">Ki Burst</option>
<option value="347">Valor</option>
<option value="348">Blade of the Exile</option>
<option value="349">Runic Blade</option>
<option value="350">Flamespitter</option>
<option value="351">Scrap Shield</option>
<option value="352">Electro Harpoon</option>
<option value="353">The Equalizer</option>
<option value="354">Junkyard Titan</option>
<option value="355">Overload</option>
<option value="373">Stand United</option>
<option value="356">Rune Prison</option>
<option value="357">Spell Flux</option>
<option value="358">Desperate Power</option>
<option value="359">Arcane Mastery</option>
<option value="360">Arctic Assault</option>
<option value="361">Northern Winds</option>
<option value="362">Permafrost</option>
<option value="363">Glacial Prison</option>
<option value="364">Frost</option>
<option value="365" selected="selected">Deceive</option>
<option value="366">Jack In The Box</option>
<option value="367">Two-Shiv Poison</option>
<option value="368">Hallucinate</option>
<option value="369">Backstab</option>
<option value="370">Vorpal Blade</option>
<option value="371">Feint</option>
<option value="372">Shadow Dash</option>
<option value="374">Ki Strike</option>
<option value="375">Twin Bite</option>
<option value="376">Burnout</option>
<option value="377">Flame Breath</option>
<option value="378">Dragon's Descent</option>
<option value="379">Fury of the Dragonborn</option>
<option value="380">Poison Trail</option>
<option value="381">Mega Adhesive</option>
<option value="382">Fling</option>
<option value="383">Insanity Potion</option>
<option value="384">Empowered Bulwark</option>
<option value="385">Cryptic Gaze</option>
<option value="386">Death's Caress</option>
<option value="387">Enrage</option>
<option value="388">Cannibalism</option>
<option value="389">Feel No Pain</option>
<option value="390">Boomerang Blade</option>
<option value="391">Ricochet</option>
<option value="392">Spell Shield</option>
<option value="479">Night Hunter</option>
<option value="393">On The Hunt</option>
<option value="394">Fleet of Foot</option>
<option value="395">Crystal Slash</option>
<option value="396">Crystalline Exoskeleton</option>
<option value="397">Fracture</option>
<option value="398">Impale</option>
<option value="399">Energize</option>
<option value="400">Hymn of Valor</option>
<option value="401">Aria of Perseverance</option>
<option value="402">Song of Celerity</option>
<option value="403">Crescendo</option>
<option value="404">Power Chord</option>
<option value="405">Starcall</option>
<option value="406">Astral Blessing</option>
<option value="407">Infuse</option>
<option value="408">Wish</option>
<option value="409">Consecration</option>
<option value="410">Decrepify</option>
<option value="411">Nevermove</option>
<option value="412">Torment</option>
<option value="413">Ravenous Flock</option>
<option value="414">Carrion Renewal</option>
<option value="415">Dark Sphere</option>
<option value="416">Force of Will</option>
<option value="417">Scatter the Weak</option>
<option value="418">Unleashed Power</option>
<option value="419">Transcendent</option>
<option value="420">Noxian Diplomacy</option>
<option value="421">Rake</option>
<option value="422">Cutthroat</option>
<option value="423">Shadow Assault</option>
<option value="424">Mercy</option>
<option value="425">Imbue</option>
<option value="426">Shatter</option>
<option value="427">Dazzle</option>
<option value="428">Radiance</option>
<option value="429">Gemcraft</option>
<option value="430">Blinding Dart</option>
<option value="431">Move Quick</option>
<option value="432">Toxic Shot</option>
<option value="433">Noxious Trap</option>
<option value="434">Camouflage</option>
<option value="435">Rapid Fire</option>
<option value="436">Rocket Jump</option>
<option value="437">Explosive Shot</option>
<option value="438">Buster Shot</option>
<option value="439">Draw a Bead</option>
<option value="440">Rabid Bite</option>
<option value="441">Contaminate</option>
<option value="442">Pillar of Filth</option>
<option value="443">Agony</option>
<option value="444">Decompose</option>
<option value="445">Bloodlust</option>
<option value="446">Mocking Shout</option>
<option value="447">Spinning Slash</option>
<option value="448">Undying Rage</option>
<option value="449">Battle Fury</option>
<option value="450">Wild Cards</option>
<option value="451">Pick A Card</option>
<option value="452">Stacked Deck</option>
<option value="453">Destiny</option>
<option value="454">Loaded Dice</option>
<option value="455">Ambush</option>
<option value="456">Venom Cask</option>
<option value="457">Expunge</option>
<option value="458">Spray and Pray</option>
<option value="459">Deadly Venom</option>
<option value="460">Tiger Stance</option>
<option value="461">Turtle Stance</option>
<option value="462">Bear Stance</option>
<option value="463">Phoenix Stance</option>
<option value="464">Monkey's Agility</option>
<option value="465">Acid Hunter</option>
<option value="466">Terror Capacitor</option>
<option value="467">Noxian Corrosive Charge</option>
<option value="468">Hyper-Kinetic Position Reverser</option>
<option value="469">Zaun-Touched Bolt Augmenter</option>
<option value="470">Piercing Arrow</option>
<option value="471">Blighted Quiver</option>
<option value="472">Hail of Arrows</option>
<option value="473">Chain of Corruption</option>
<option value="474">Living Vengeance</option>
<option value="475">Tumble</option>
<option value="476">Silver Bolts</option>
<option value="477">Condemn</option>
<option value="478">Final Hour</option>
<option value="480">Baleful Strike</option>
<option value="481">Dark Matter</option>
<option value="482">Event Horizon</option>
<option value="483">Primordial Burst</option>
<option value="484">Equilibrium</option>
<option value="485">Power Transfer</option>
<option value="486">Gravity Field</option>
<option value="487">Death Ray</option>
<option value="488">Chaos Storm</option>
<option value="489">Evolving Technology</option>
<option value="490">Transfusion</option>
<option value="491">Sanguine Pool</option>
<option value="492">Tides of Blood</option>
<option value="493">Hemoplague</option>
<option value="494">Crimson Pact</option>
<option value="495">Rolling Thunder</option>
<option value="496">Frenzy</option>
<option value="497">Majestic Roar</option>
<option value="498">Thunder Claws</option>
<option value="499">Chosen of the Storm</option>
<option value="500">Hungering Strike</option>
<option value="501">Hunters Call</option>
<option value="502">Blood Scent</option>
<option value="503">Infinite Duress</option>
<option value="504">Eternal Thirst</option>
<option value="505">Crushing Blow</option>
<option value="506">Decoy</option>
<option value="507">Nimbus Strike</option>
<option value="508">Cyclone</option>
<option value="509">Stone Skin</option>
<option value="510">Arcanopulse</option>
<option value="511">Locus of Power</option>
<option value="512">Mage Chains</option>
<option value="513">Arcane Barrage</option>
<option value="514">Ascended Form</option>
<option value="515">Three Talon Strike</option>
<option value="516">Battle Cry</option>
<option value="517">Audacious Charge</option>
<option value="518">Crescent Sweep</option>
<option value="519">Challenge</option>
<option value="520">Omen of War</option>
<option value="521">Omen of Pestilence</option>
<option value="522">Omen of Famine</option>
<option value="523">Omen of Death</option>
<option value="524">Unholy Covenant</option>
<option value="525">Razor Shuriken</option>
<option value="526">Living Shadow</option>
<option value="527">Shadow Slash</option>
<option value="528">Death Mark</option>
<option value="529">Contempt for the Weak</option>
<option value="530">Bouncing Bomb</option>
<option value="531">Satchel Charge</option>
<option value="532">Hexplosive Minefield</option>
<option value="533">Mega Inferno Bomb</option>
<option value="534">Short Fuse</option>
<option value="535">Time Bomb</option>
<option value="536">Rewind</option>
<option value="537">Time Warp</option>
<option value="538">Chronoshift</option>
<option value="539">Heightened Learning</option>
<option value="540">Deadly Bloom</option>
<option value="541">Rampant Growth</option>
<option value="542">Grasping Roots</option>
<option value="543">Stranglethorns</option>
<option value="544">Rise of the Thorns</option>
</select>
<div class="well lite">
<div class="button-group">
<%= link_to "Back to list", collection_path, :class => 'btn primary' %>
<%= link_to "View #{resource_class.model_name.human}", resource_path(resource), :class => 'btn primary' %>
</div>
</div>
<div class="well lite">
<header>
<h2 class="page-heading">Edit <%=resource_class.model_name.human%></h2>
</header>
<section class="well lite">
<% attributes = resource_class.attribute_names - %w(id created_at updated_at) %>
<%= render "form", :attributes => attributes %>
</section>
</div>
{"utf8"=>"✓",
"_method"=>"put",
"authenticity_token"=>"BYxMtZWQALtjnS7sIO6T+6fbxSRZMTtkZoSD9CfjCTE=",
"champion"=>{"champion_id"=>"35",
"name"=>"Shaco",
"title"=>"the Demon Jester",
"icon"=>"images/champions/icon/champion_icon_35.png",
"image"=>"images/champions/detail/champion_detail_35.jpg",
"lore"=>"Most would say that death isn't funny. It isn't,
unless you're Shaco - then it's hysterical. He is Valoran's first fully functioning homicidal comic; he jests until someone dies,
and then he laughs. The figure that has come to be known as the Demon Jester is an enigma. No one fully agrees from whence he came,
and Shaco never offers any details on his own. A popular belief is that Shaco is not of Runeterra - that he is a thing summoned from a dark and twisted world. Still others believe that he is the demonic manifestation of humanity's dark urges and therefore cannot be reasoned with. The most plausible belief is that Shaco is an assassin for hire,
left to his own lunatic devices until his services are needed. Shaco certainly has proven himself to be a cunning individual,
evading authorities at every turn who might seek him for questioning for some horrendous,
law-breaking atrocity. While such scuttlebutt might reassure the native inhabitants of Valoran,
it seems unimaginable that such a malfeasant figure is allowed to remain at large.\r\n\r\nWhatever the truth of his history might be,
Shaco has joined the League of Legends for reasons only he knows. He is a terrifying figure,
typically shunned by both his fellow champions and the media at large. Only the summoners in the Institute of War know why such a creature was allowed into the League,
but most Runeterrans suspect it to be a means that allows the power that be to keep an eye on the ever-elusive Shaco. Unsurprisingly,
this champion is popular in places where madness can openly reign,
such as among the power-hungry summoners of Zaun and Noxus.\r\n\r\nWhatever you do,
don't tell him you missed the punch line.",
"damage"=>"51.7",
"damage_modifier"=>"3.5",
"health"=>"441.0",
"health_modifier"=>"84.0",
"mana"=>"230.0",
"mana_modifier"=>"40.0",
"move_speed"=>"350.0",
"armor"=>"15.0",
"armor_modifier"=>"3.5",
"spell_block"=>"30.0",
"spell_block_modifier"=>"1.25",
"health_regen"=>"7.45",
"health_regen_modifier"=>"0.55",
"mana_regen"=>"6.4",
"mana_regen_modifier"=>"0.45",
"recommended_classic_items"=>"",
"recommended_dominion_items"=>"",
"tips"=>"Using Deceive over terrain can help you make a clean escape.|Try getting items with on-hit effects. These will also benefit your Hallucination clone.|Deceive's damage can be increased with increased Critical Damage effects like Infinity Edge.",
"tags"=>"assassin,
stealth,
melee",
"abilities"=>"{\"abilities\":[{\"index\":0,
\"name\":\"Deceive\",
\"icon\":\"images/champions/abilities/35/0.png\",
\"description\":\"Shaco becomes invisible and teleports to target location. His next attack is guaranteed to critically strike.\",
\"effect\":\"Shaco teleports nearby and becomes invisible for 3.5 seconds.His next basic attack within the next 6 seconds will critically strike,
dealing 140/160/180/200/220% damage (normal critical strikes deal 200% damage).\",
\"stats\":{\"cost\":\"90/80/70/60/50 Mana\",
\"range\":\"500\",
\"cooldown\":\"11\"}},
{\"index\":1,
\"name\":\"Jack In The Box\",
\"icon\":\"images/champions/abilities/35/1.png\",
\"description\":\"Shaco creates an animated Jack-in-the-Box at target location,
which will wait,
invisible,
to Fear nearby units and attack them when some come nearby.\",
\"effect\":\"Shaco creates a Jack in the Box at the target location. It will become invisible after 2 seconds,
and pop out when an enemy comes near,
fearing nearby enemies for 0.5/0.75/1/1.25/1.5 seconds and attacking them.Its attacks deal 35/50/65/80/95 (+0.2) magic damage and it lasts for 60 seconds while invisible or 5 seconds while firing.\",
\"stats\":{\"cost\":\"50/55/60/65/70 Mana\",
\"range\":\"425\",
\"cooldown\":\"16\"}},
{\"index\":2,
\"name\":\"Two-Shiv Poison\",
\"icon\":\"images/champions/abilities/35/2.png\",
\"description\":\"Shaco's Shivs passively poison targets on hit,
slowing them and applying a miss chance to minions. He can throw his Shivs to deal damage and poison the target.\",
\"effect\":\"Passive: While Two-Shiv Poison is ready to cast,
Shaco's basic attacks reduce the target's Movement Speed by 20/22.5/25/27.5/30% for 2 seconds. Also reduces minions' chance to hit by 20/22.5/25/27.5/30% for 2 seconds.Active: Deals 50/90/130/170/210 (+1.0) (+1) magic damage to target enemy and reduces their Movement Speed by 20/22.5/25/27.5/30% for 3 seconds.\",
\"stats\":{\"cost\":\"50/55/60/65/70 Mana\",
\"range\":\"625\",
\"cooldown\":\"8\"}},
{\"index\":3,
\"name\":\"Hallucinate\",
\"icon\":\"images/champions/abilities/35/3.png\",
\"description\":\"Shaco creates an illusion of himself near him,
which can attack nearby enemies. (Deals half damage to turrets.) Upon death,
it explodes,
dealing damage to nearby enemies.\",
\"effect\":\"Shaco vanishes briefly and reappears with a clone that lasts up to 18 seconds. The clone deals 75% of Shaco's damage and receives 50% increased damage.On death,
the clone detonates,
dealing 300/450/600 (+1) magic damage to nearby enemies.The clone can be controlled by holding the alt key and using the right mouse button or by reactivating this ability.\",
\"stats\":{\"cost\":\"100 Mana\",
\"range\":\"250\",
\"cooldown\":\"100/90/80\"}},
{\"index\":4,
\"name\":\"Backstab\",
\"icon\":\"images/champions/abilities/35/4.png\",
\"description\":\"Shaco deals 20% bonus damage when striking a unit from behind.\",
\"effect\":\"\",
\"stats\":{}}]}",
"attack_damage_rating"=>"8",
"health_rating"=>"4",
"ability_power_rating"=>"6",
"difficulty_rating"=>"9",
"ip_cost"=>"3150",
"rp_cost"=>"975",
"spotlight_video"=>"Q9m48jiVWL4",
"free"=>"0",
"release_date"=>"2009-10-10",
"ultimate_type"=>"normal",
"crit"=>"0.0",
"crit_modifier"=>"0.0",
"attack_range"=>"125.0",
"attack_speed_offset"=>"-0.1",
"attack_speed_modifier"=>"3.0",
"q"=>"365",
"w"=>"366",
"e"=>"367",
"r"=>"368",
"passive"=>"369"},
"commit"=>"Update Champion",
"id"=>"73"}
class Manage::ResourceController < Manage::ApplicationController
has_scope :page, :default => 1, :only => [:index]
inherit_resources
respond_to :html
end
ActiveRecord::Schema.define(:version => 20130109201223) do
create_table "abilities", :force => true do |t|
t.text "ability_description"
t.text "effect"
t.string "name"
t.string "cost"
t.string "range"
t.string "cooldown"
t.string "icon"
t.string "champion_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "champions", :force => true do |t|
t.string "champion_id"
t.string "name"
t.string "title"
t.string "icon"
t.string "image"
t.text "lore"
t.string "damage"
t.string "damage_modifier"
t.string "health"
t.string "health_modifier"
t.string "mana"
t.string "mana_modifier"
t.string "move_speed"
t.string "armor"
t.string "armor_modifier"
t.string "spell_block"
t.string "spell_block_modifier"
t.string "health_regen"
t.string "health_regen_modifier"
t.string "mana_regen"
t.string "mana_regen_modifier"
t.string "recommended_classic_items"
t.string "recommended_dominion_items"
t.text "tips"
t.string "tags"
t.text "abilities"
t.string "attack_damage_rating"
t.string "health_rating"
t.string "ability_power_rating"
t.string "difficulty_rating"
t.string "ip_cost"
t.string "rp_cost"
t.string "spotlight_video"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "free"
t.string "release_date"
t.string "ultimate_type"
t.string "crit"
t.string "crit_modifier"
t.string "attack_range"
t.string "attack_speed_offset"
t.string "attack_speed_modifier"
t.integer "q_id"
t.integer "w_id"
t.integer "e_id"
t.integer "r_id"
t.integer "passive_id"
end
add_index "champions", ["updated_at"], :name => "index_champions_on_updated_at"
create_table "items", :force => true do |t|
t.string "item_id"
t.string "name"
t.text "description"
t.string "icon"
t.string "builds_into"
t.string "built_from"
t.string "upgrade_cost"
t.string "total_cost"
t.string "tags"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "purchasable"
t.boolean "twisted_treeline"
t.boolean "summoners_rift"
t.boolean "crystal_scar"
t.text "stats"
t.string "sell_price"
end
add_index "items", ["item_id"], :name => "index_items_on_item_id"
add_index "items", ["updated_at"], :name => "index_items_on_updated_at"
create_table "masteries", :force => true do |t|
t.string "mastery_id"
t.string "name"
t.text "description"
t.string "icon"
t.string "dependency"
t.string "tier"
t.string "position"
t.string "tree"
t.string "max_points"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "stats"
end
add_index "masteries", ["updated_at"], :name => "index_masteries_on_updated_at"
create_table "runes", :force => true do |t|
t.string "name"
t.string "rune_type"
t.string "icon"
t.text "description"
t.string "cost"
t.string "tags"
t.string "tier"
t.string "rune_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "stats"
end
add_index "runes", ["updated_at"], :name => "index_runes_on_updated_at"
create_table "spells", :force => true do |t|
t.string "name"
t.string "description"
t.text "icon"
t.string "level"
t.string "spell_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "spells", ["updated_at"], :name => "index_spells_on_updated_at"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.