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
| So the model object can bind the event "change:#{field} to trigger event when the field value is changed. | |
| By default it's off and if need this feature, the model should extend Spine.Model.Dirty. | |
| A sample case. | |
| class User extends Spine.Model | |
| @extend Spine.Model.Dirty | |
| 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
| # A config.ru useful for serving static sites from the "Bamboo" heroku stack. | |
| # | |
| # Interface: | |
| # | |
| # Url Path | Action | |
| # -------- | ------------------------------------------------------------- | |
| # / | contents of: index.html OR | |
| # | contents of: 404.html OR | |
| # | default 404 message | |
| # | |
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
| desc "convert a latin1 database with utf8 data into proper utf8" | |
| task :convert_to_utf8 => :environment do | |
| puts Time.now | |
| dryrun = ENV['DOIT'] != '1' | |
| conn = ActiveRecord::Base.connection | |
| if dryrun | |
| def conn.run_sql(sql) | |
| puts(sql) | |
| end | |
| else |
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
| { | |
| "Statement":[ | |
| { | |
| "Action":[ | |
| "route53:ChangeResourceRecordSets", | |
| "route53:GetHostedZone", | |
| "route53:ListResourceRecordSets" | |
| ], | |
| "Effect":"Allow", | |
| "Resource":[ |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
NewerOlder