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 Answer < ApplicationRecord | |
| has_one :answer_open, dependent: :destroy | |
| has_one :answer_rating, dependent: :destroy | |
| accepts_nested_attributes_for :answer_open, reject_if: :all_blank | |
| accepts_nested_attributes_for :answer_rating, reject_if: :all_blank | |
| 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
| it "opens the file correctly" do | |
| file_path = "/some/path/to.xml" | |
| xml = "<xml>bleh</xml>" | |
| stub_file = stub("fake_file") | |
| stub_file.stub(:read).and_return(xml) | |
| File.stub(:open).and_return(stub_file) | |
| reader = Wastead::DataReader::XMLReader.new() | |
| reader.should_receive(:process_xml).with(xml) |
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
| =begin | |
| Capistrano deployment email notifier for Rails 3 | |
| Do you need to send email notifications after application deployments? | |
| Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html. | |
| Here is Rails 3 port of the notifier. | |
| The notifier sends an email after application deployment has been completed. |