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 your model | |
| def self.full_message_fields | |
| [:field1, :field2] # these fields will display the full message | |
| end | |
| # inside your form | |
| -if @group.errors.any? | |
| #error_explanation | |
| %ul | |
| - @group.errors.each do |attr, msg| |
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 QwikObject = function (id, x, y, z) { | |
| this._x = x || 0; | |
| }; | |
| QwikObject.prototype = { | |
| get x(){ | |
| return this._x; | |
| }, | |
| set x(x){ | |
| this._x = x; |
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 Note = function (name) { | |
| var someMethod = function() {}; | |
| return { | |
| publicMethod: someMethod, | |
| ... | |
| } | |
| }; | |
| var note1 = new Note('whatever'); |
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
| development: | |
| adapter: postgresql | |
| encoding: unicode | |
| username: vkansal | |
| password: | |
| pool: 5 | |
| min_messages: WARNING | |
| database: caprica_dev | |
| test: |
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
| development: | |
| adapter: mysql2 | |
| username: root | |
| password: coolio | |
| socket: /tmp/mysql.sock | |
| encoding: utf8 | |
| database: r101_development | |
| # warning: the database defined as "test" will be erased and | |
| # re-generated from your development database when you run "rake". |
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
| cap production deploy | |
| triggering start callbacks for `production' | |
| Enter passphrase for /Users/jimmy/.ssh/id_rsa: | |
| Identity added: /Users/jimmy/.ssh/id_rsa (/Users/jimmy/.ssh/id_rsa) | |
| * executing `production' | |
| triggering start callbacks for `deploy' | |
| * executing `multistage:ensure' | |
| Enter passphrase for /Users/jimmy/.ssh/id_rsa: | |
| Identity added: /Users/jimmy/.ssh/id_rsa (/Users/jimmy/.ssh/id_rsa) | |
| * executing `deploy' |
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
| # works | |
| context "POST edit_subscriptions" do | |
| setup do | |
| fake_login | |
| @user.subscriptions << Factory(:subscription) | |
| @user.reminder_preferences << Factory(:reminder_preference) | |
| post :edit_subscriptions, :params => {:commit => "Unsubscribe", :action => "edit_subscriptions", :id => @user.id, :controller => "users", | |
| "#{@user.reminder_preferences.first.id}_email" => "on"} | |
| assert_equal @user.reminder_preferences, [] |
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
| 99.downto(1){|i| puts "#{i} bottles of beer on the wall, #{i} bottles of beer! Take one down, pass it around, #{i-1} bottles of beer on the wall!" } |
NewerOlder