Skip to content

Instantly share code, notes, and snippets.

View ariejan's full-sized avatar

Ariejan de Vroom ariejan

View GitHub Profile
class Article < ActiveRecord::Base
# Nothing to do here really...
end
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.protect_against_forgery?
# STI, this is the base model which is stored in the database
class Character < ActiveRecord::Base
belongs_to :location
def move_to(new_location)
update_attribute(:location_id, new_location.id)
# or:
# self.location = new_location
# save
SELECT `articles`.*, `priorities`.position
FROM `articles`
LEFT OUTER JOIN `priorities` ON priorities.article_id = articles.id
WHERE (`articles`.`status` = 1)
ORDER BY priorities.position ASC, created_at DESC LIMIT 0, 20
package com.noir.clientv2.handlers;
import com.jme.input.InputHandler;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;
import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;
import com.jmex.game.state.GameState;
import com.noir.clientv2.NoirClientV2;