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
undefined method `in_use?' for nil:NilClass | |
Nov 27, 2012 8:40:01 PM org.apache.catalina.core.ApplicationContext log | |
SEVERE: Application Error | |
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `in_use?' for nil:NilClass | |
at ActiveRecord::ConnectionAdapters::ConnectionPool.clear_stale_cached_connections!(/var/lib/tomcat7/hosts/app-name-masked.company.net/webapps/specialevents/WEB-INF/gems/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:206) | |
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) | |
at ActiveRecord::ConnectionAdapters::ConnectionPool.clear_stale_cached_connections!(/var/lib/tomcat7/hosts/app-name-masked.company.net/webapps/specialevents/WEB-INF/gems/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:204) | |
at ActiveRecord::ConnectionAdapters::ConnectionPool.checkout(/var/lib/tomcat7/hosts/app-name-masked.company.net/webapps/specialevents/WEB-INF/gems/gems/activerecord-3.2.6/lib/active_record |
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
package bms; | |
import net.minecraft.entity.Entity; | |
import net.minecraft.entity.EntityLivingBase; | |
import net.minecraft.entity.player.EntityPlayer; | |
import net.minecraft.item.EnumArmorMaterial; | |
import net.minecraft.item.ItemArmor; | |
import net.minecraft.item.ItemStack; | |
import net.minecraft.util.DamageSource; |
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
def index | |
Thread.abort_on_exception = true | |
thr_one = Thread.new do | |
@list_one = ModelOne.find_model_ones_in_elasticsearch(params[:page]) | |
end | |
thr_two = Thread.new do | |
@list_two = ModelTwo.find_model_twos_in_elasticsearch(params[:page]) | |
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
module GzipHelper | |
def gzip_javascript_include_tag(asset) | |
# Grab the asset html include tag | |
tag = javascript_include_tag asset | |
# If we are in production and the requesting client accepts gzip encoding, swap for the gzip asset | |
if Rails.env.production? && request.accept_encoding =~ /gzip/i | |
tag = tag.gsub(/\.js/i, ".js.gz") | |
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
class Inquiry < ActiveRecord::Base | |
include Rakismet::Model | |
# Create Validator which will hit the Akismet API | |
class SpamValidator < ActiveModel::Validator | |
def validate(record) | |
return true unless record.spam? # record.spam? will hit the Akismet API | |
record.errors[:base] << "Spam message detected." | |
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
class YourModel < ActiveRecord::Base | |
include Rakismet::Model | |
# Create Validator which will hit the Akismet API | |
class SpamValidator < ActiveModel::Validator | |
def validate(record) | |
return true unless record.spam? # record.spam? will hit the Akismet API | |
record.errors[:base] << "Spam message detected." | |
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
# Model Mapping example | |
# Be sure to replicate this with your actual model | |
class YourModel < ActiveRecord::Base | |
include Elasticsearch::Model | |
include Elasticsearch::Model::Callbacks | |
settings IndexHelper.type_ahead_analysis do | |
mappings do | |
indexes :id, index: :no | |
indexes :screen_name, type: 'string', analyzer: 'autocomplete' |
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
App.ImgView = Ember.View.extend({ | |
tagName: 'img', | |
attributeBindings: ['src', 'alt', 'onerror'], | |
defaultPlaceholderImgUrl: "<%= asset_path('kite-client/defaults/default.png') %>", | |
companyPlaceholderImgUrl: "<%= asset_path('kite-client/defaults/company.png') %>", | |
onerror: function(){ | |
return "this.onerror=null;this.src='" + this.get('placeholder') + "';" | |
}.property('src'), | |
placeholder: function(){ | |
return this.get(this.get('placeholderName') + 'PlaceholderImgUrl') || this.get('defaultPlaceholderImgUrl'); |
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
How Arnold Tanks Like a Fucking Beast Warrior | |
--------------------------------------------- | |
This is pretty much just the standard stuff. U'll find urself swapping | |
between rotations regularly, even trading them in and out of eachother. | |
Just stay loose and watch your hate meters and you will tank like Arnold. | |
Pull: | |
(1) Heavy Swing or Tomahawk | |
> Flash when mobs are near |
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
$ rake test:prepare | |
WARN: Unresolved specs during Gem::Specification.reset: | |
minitest (~> 5.1) | |
WARN: Clearing out unresolved specs. | |
Please report a bug if this causes problems. |
OlderNewer