This file contains 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
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) | |
+(4 nil) | |
(setq indent (+ (current-column) ruby-indent-level)) | |
(cond ((looking-at "do\\>[^_]") (if (nth 3 state) (goto-char (nth 3 state)) (goto-char parse-start) (back-to-indentation)) (setq indent (ruby-indent-size (current-column) (nth 2 state)))) (t (setq indent (+ (current-column) ruby-indent-level)))) | |
(cond ((nth 0 state) (setq indent nil)) ((car (nth 1 state)) (goto-char (setq begin (cdr (nth 1 state)))) (let ((deep (ruby-deep-indent-paren-p (car (nth 1 state)) (1- (cdr ...))))) (if deep (cond ((and (eq deep t) (eq ... paren)) (skip-syntax-backward " ") (setq indent (1- ...))) ((let (...) (and ... ... ...)) (forward-word -1) (setq indent (ruby-indent-size ... ...))) (t (setq indent (current-column)) (cond (...) (paren ...) (t ...)))) (if (nth 3 state) (goto-char (nth 3 state)) (goto-char parse-start) (back-to-indentation)) (setq indent (ruby-indent-size (current-column) (nth 2 state)))) (and (eq (car (nth 1 state)) paren) |
This file contains 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
%select.span2.weekSelector | |
%option{:value => 0} Every Week | |
- @max_week.downto(1) do |w| | |
- if w == @today_comweek | |
%option{:value => w, :selected => "selected"}= "Week #{w} *" | |
- else | |
%option{:value => w}= "Week #{w}" |
This file contains 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
config.paperclip_defaults = { | |
:storage => :s3, | |
:url => ":s3_domain_url" | |
:s3_host_name => "s3.amazonaws.com", | |
:s3_credentials => { | |
:bucket => 'healthyhabitsutah', | |
:access_key_id => ENV['AWS_KEY'], | |
:secret_access_key => ENV['AWS_SECRET'] | |
} | |
} |
This file contains 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
= simple_form_for @machine_visit_form do |f| | |
= f.error_notification | |
= f.input :refill_id, as: :hidden | |
= f.input :refill_date, as: :date | |
= f.input :refill_counter, as: :decimal, input_html: {value: number_with_precision(f.object.refill_counter, precision: 2) } | |
- @machine_visit_form.refill_line_items.each_with_index do |rli, i| | |
.well | |
= "#{rli.product_name}" |
This file contains 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
huge_string.size | |
=> 65550 | |
data.size | |
=> 65536 | |
data.include? "ends in awesome" | |
=> false |
This file contains 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
stuff |
This file contains 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
stuff |
This file contains 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 PromisePayableCompany::CouldntCreateUserError < StandardError | |
def initialize(company) | |
@company = company | |
end | |
def to_s | |
"#{super} PromisePay User couldn't be created for company #{@company.id}" | |
end | |
end |
This file contains 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 | |
raise PromisePayableCompany::CouldntCreateBankAccountError, @company | |
user = @company.users.first | |
pp_company = PromisePayableCompany.new(@company, user) | |
pp_company.maybe_attach_user | |
pp_company.maybe_attach_company | |
rescue PromisePayableCompany::CouldntCreateUserError => e | |
Rails.logger.error e | |
Raven.capture_exception(e) | |
flash[:alert] = "There was a problem registering your company with Promise Pay."\ |
This file contains 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
if @company.update_attributes(update_company_params) | |
begin | |
raise PromisePayableCompany::CouldntCreateBankAccountError, @company | |
user = @company.users.first | |
pp_company = PromisePayableCompany.new(@company, user) | |
pp_company.maybe_attach_user | |
pp_company.maybe_attach_company | |
rescue PromisePayableCompany::CouldntCreateUserError, | |
PromisePayableCompany::CouldntCreateCompanyError, | |
PromisePayableCompany::CouldntCreateBankAccountError => e |
OlderNewer