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
listeners:{ | |
tap: { | |
element: 'element', | |
delegate: '.student-seat .doc-box, .bubble-holder', | |
fn: function(e){ | |
var me = this; | |
var url = e.target.name |
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
export BUNDLER_EDITOR=mine | |
bundle open devise |
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 Story < ActiveRecord::Base | |
validates :title, :link, :category, :upvotes, presence: true | |
scope :popular, -> { where('upvotes >= ?', 4)} | |
scope :recent, -> { where('created_at >= ?', Date.today)} | |
def self.search_for(query) | |
where('title LIKE :query OR category LIKE :query', query: "%#{query}%") | |
end | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder