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
| RSpec.configure do |config| | |
| config.before(:suite) do | |
| DatabaseCleaner.clean_with(:truncation) | |
| end | |
| config.before(:each) do | |
| DatabaseCleaner.strategy = :transaction | |
| 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
| #!/usr/bin/env ruby | |
| require 'net/smtp' | |
| unless (2..3).include? ARGV.length | |
| puts 'Usage: mail.rb SUBJECT TO [FROM]' | |
| exit 1 | |
| end | |
| subject, to, from_ = ARGV |
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
Show hidden characters
| { | |
| "folders": | |
| [ | |
| { | |
| "follow_symlinks": true, | |
| "path": ".", | |
| "folder_exclude_patterns": ["tmp", "log", "coverage"] | |
| } | |
| ], |
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
| $('#graph-preview').replaceWith("<%=j render partial: 'preview' %>"); | |
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
| module Tokenable | |
| extend ActiveSupport::Concern | |
| included do | |
| before_create :generate_token | |
| end | |
| protected | |
| def generate_token |
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 Toggler = (function() { | |
| var totalTogglers = 0; | |
| var Toggler = function() { | |
| this.linkSelector = ".detail_toggle"; | |
| this.detailSelector = ".detail"; | |
| this.hiddenClass = "hidden"; | |
| this.hideText = "Hide Details"; | |
| this.showText = "Show Details"; | |
| }; | |
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 AirplaneClass < ActiveRecord::Base | |
| attr_accessible :name, :description, :organization_id, :stations_attributes, | |
| :ifr_certified, :currency_if_over_150, :min_hours_to_qualify, | |
| :max_wind_limitation, :min_weight, :max_weight, :datapoints_attributes, | |
| :cruise_performance_chart_id, :landing_distance_chart_id, | |
| :takeoff_distance_chart_id | |
| belongs_to :organization | |
| has_many :airplanes | |
| has_many :stations |