海野弘成 (うみのひろしげ)
Qiitaでサーバーサイドの開発をしています. 以前ははてなやGoogle Japanでインターン,アルバイトでwebアプリケーションやiPhoneアプリの開発をしていました.
- Rails 3.1.3
- Ruby 1.9.2
海野弘成 (うみのひろしげ)
Qiitaでサーバーサイドの開発をしています. 以前ははてなやGoogle Japanでインターン,アルバイトでwebアプリケーションやiPhoneアプリの開発をしていました.
model.bind('hoge', function () { | |
alert('hogeされた'); | |
}); | |
model.trigger('hoge'); // => alert('hogeされた'); |
class A | |
def A.class_method_one; end def self.class_method_two; end class << A | |
def class_method_three; end | |
end class << self | |
def class_method_four; end | |
end | |
enddef A.class_method_five; endclass << A | |
def class_method_six; end | |
end |
p 'test' |
alert('hello'); |
puts "hello, world!" |
// Return Backbone.sync's retval instead of the saved model | |
// to use the deferred object ($.ajax: jsdeferred.jquery.js). | |
Backbone.Collection.prototype.createDeferred = function(model, options) { | |
var coll = this; | |
options || (options = {}); | |
model = this._prepareModel(model, options); | |
if (!model) return false; | |
return model.save(null, options); | |
}; |
p 'hi' |
p 'hello' |
p 'hello' |