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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
students table | |
id name | |
1 Felix | |
2 John | |
3 Bob | |
assignments table | |
id student_id number status |
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 Student < ActiveRecord::Base | |
has_many :assignments | |
end | |
class Assignment < ActiveRecord::Base | |
belongs_to :student | |
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
Felix is software developer who likes to dabble in art, snowboarding | |
and often times finds himself in very unusual situations. |
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
// | |
// UIViewController+ActionSheet.h | |
// Tweaks | |
// | |
// Created by Felix Flores on 12/21/12. | |
// Copyright (c) 2012 felixflor.es. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UIViewController+Segue.h | |
// TimeCapsule | |
// | |
// Created by Felix Flores on 12/19/12. | |
// Copyright (c) 2012 felixflor.es. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// Assuming you have underscore and jQuery as a project dependency. | |
// You can use this to include individual files on your jasmine specs. | |
// Sample Usage | |
requireJS('myJSfile', 'myOtherJsFile'); | |
describe("My stuff", function() { | |
it("rocks", function() { | |
// your spec |
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 MoviesController < ApplicationController | |
def index | |
if params[:filter] == "coming_soon" | |
@movies = Movie.coming_soon | |
else | |
@movies_for_the_week = Movie.for_the_week | |
end | |
@view = params[:filter] | |
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
# WHAT!!!! | |
(rdb:27) @movies_for_the_week[1][:items].size | |
2 | |
(rdb:27) @movies_for_the_week[1][:items] | |
[] | |
(rdb:27) @movies_for_the_week[1][:items].size | |
0 | |
>> m = Movie.for_the_week |
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
named_scope :coming_soon, | |
:joins => :showtimes, | |
:having => 'showtimes.day > CURRENT_DATE' |
NewerOlder