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
#In my schema | |
t.string "picture", default: [], array: true | |
#In my projects_controller.rb | |
def index | |
@projects = Project.friendly.all | |
end | |
def show | |
@project = Project.friendly.find(params[:id]) | |
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
window.onload = function () { | |
var width = 800, | |
height = 800, | |
platformWidth = 200, | |
sprite, | |
platforms, | |
game = new Phaser.Game(800, 700, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); | |
function preload() { |
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
def delete(line) | |
tmp = Tempfile.new("todo_temp") | |
open(file, "r").each.with_index do |index, l| | |
tmp << l unless line == index.to_i | |
end | |
tmp.close | |
FileUtils.mv(tmp.path, file) | |
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
GIT | |
remote: git://github.com/leshill/handlebars_assets.git | |
revision: 03cb3ed3f44b1e2f669432a8d6aa346a4b25b6d2 | |
specs: | |
handlebars_assets (0.22.0) | |
execjs (~> 2.0) | |
multi_json (~> 1.0) | |
sprockets (>= 2.0.0) | |
tilt (>= 1.2) |
NewerOlder