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 Website < ActiveRecord::Base | |
| validates :state, :inclusion => { :in => ['review', 'active', 'paused', 'rejected'] } | |
| validate :address_in_a_special_way | |
| def address_in_a_special_way | |
| #add an error if address doesnt correspond to my custom rules | |
| end | |
| 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
| Exception ActionController::UnknownHttpMethod in application (DEBUG, accepted HTTP methods are OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, ORDERPATCH, ACL, SEARCH, and PATCH) (process 29804, thread #<Thread:0x0000000165dfc8>): | |
| from /srv/project/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/http/request.rb:275:in `check_method' | |
| from /srv/project/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/http/request.rb:68:in `request_method' | |
| from /srv/project/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/rack/logger.rb:40:in `started_request_message' | |
| from /srv/project/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/rack/logger.rb:31:in `call_app' | |
| from /srv/project/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/rack/logger.rb:16:in `block in call' | |
| from /srv/p |
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
| require 'openssl' | |
| require 'digest/sha1' | |
| require 'base64' | |
| require 'cgi' | |
| require 'time' | |
| require 'json' | |
| SUBDOMAIN = "Your Desk.com Subdomain" | |
| API_KEY = "Your Multipass API Key" |
OlderNewer