Skip to content

Instantly share code, notes, and snippets.

@messages = StaffMessage
.select(:id, :created_at, :payload, :is_staff, 'user.username')
.where(user: current_user).includes(:user)
import DS from 'ember-data';
const pako = window.pako;
import {
AdapterError,
InvalidError,
TimeoutError,
AbortError
} from 'ember-data/-private/adapters/errors';
import EmptyObject from "ember-data/-private/system/empty-object";
context 'invalid id' do
ids = %w( test ..\dwa ~home)
ids.each do |id|
it "#{id} not passes" do
controller = AdImagesController.new
controller.expects(:params).returns({id: id})
controller.expects(:render).with(nothing: true, status: 404)
controller.send(:validate_id_format)
end
RTXNQXDF-CLLDC94Y-TE9D7VXP-QBA77K48-M2MZWN59-825ZXF85-JZTTH2NU-7C82TG5N & Click Next - Use This Key
EAHJY7ET-A6YHKVKQ-RLTJPPWE-ALVDYCCL-8RGM4JZS-RM65HG3Q-GHE4NMXT-LD6JHGGS
WEST UNIVERSITY OF TIMIŞOARA
FACULTY OF MATHEMATICS AND COMPUTER SCIENCE
COMPUTER SCIENCE DEPARTMENT
if the text changes
starts the a timeout in 2 seconds to save
if 2 seconds has passed without changes
it saves
else clears the timeout and starts again the timeout in 2 secs
git clone https://github.com/facebook/watchman.git ~/.watchman
cd ~/.watchman && \
./autogen.sh && \
./configure && \
make && \
sudo make install
@sebyx07
sebyx07 / <3_u.md
Last active November 17, 2015 08:34

u ce faci :hear: ?

attribute :full_name
def full_name
"#{@model.name_first}, #{@model.name_last}"
end
class Authentication < ActionController::Base
protect_from_forgery with: :exception
Form = Struct.new(:username, :password)
def sign_in_form
@form = Form.new(nil, nil)
end
def sign_in