This file contains hidden or 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
| var App = function() { | |
| this.newLink = ko.observable(new Link()); | |
| this.mylinks = ko.observableArray(); | |
| this.lickedLinks = ko.observableArray(); | |
| this.allLinks = ko.observableArray(); | |
| }; |
This file contains hidden or 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 Block | |
| belongs_to :blocker, polymorphic: true | |
| module Support | |
| extend ActiveSupport::Concern | |
| included do | |
| has_many :blocks, | |
| as: blocker | |
| end | |
This file contains hidden or 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
| gem 'rails', '3.2.3' | |
| gem 'devise' | |
| -gem 'mongoid' | |
| +gem 'mongoid', '~> 3.0.0' | |
| gem 'mongoid_spacial' | |
| gem 'haml' | |
| -gem 'bson_ext' | |
| +gem 'bson_ext', '~> 1.6.1' | |
| gem "rails-backbone" | |
This file contains hidden or 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
| get '/js/riddle/:id/script.js' do | |
| riddle = Riddle.get(params[:id]) | |
| content_type 'text/javascript' | |
| render :str, riddle.js, :layout => false | |
| end |
This file contains hidden or 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
| get '/css/riddle/:id/styles.css' do | |
| riddle = Riddle.get(params[:id]) | |
| scss "#riddle #{riddle.css}" | |
| end |
This file contains hidden or 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
| @@show | |
| h1== @riddle.title | |
| #riddle | |
| == markdown @riddle.html |
This file contains hidden or 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
| @@show | |
| h1== @riddle.title | |
| #riddle | |
| == @riddle.html |
This file contains hidden or 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
| @@index | |
| - if @riddles | |
| - @riddles.each do |riddle| | |
| li | |
| a href="/riddle/#{riddle.id}"== riddle.title | |
| - else | |
| p No riddles have been created yet! |
This file contains hidden or 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
| get '/' do | |
| @riddles = Riddle.all.reverse | |
| slim :index | |
| end |
This file contains hidden or 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
| @@show | |
| h1== @riddle.title | |
| h2 Markup | |
| == @riddle.html | |
| h2 Styles | |
| == @riddle.css | |
| h2 Javascript | |
| == @riddle.js | |
| @@new |