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
require 'validators' | |
class Call < ActiveRecord::Base | |
belongs_to :clear_unit, :class_name=>"Member" | |
belongs_to :call_dispatcher | |
belongs_to :category, :class_name=>"CallCategory" | |
has_many :patients | |
has_many :responses | |
has_many :recordings |
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
#Here is the TableAcl model: | |
class TableAcl < ActiveRecord::Base | |
has_many :column_acls, :dependent => :destroy | |
.... | |
#Here is the ColumnAcl model: | |
class ColumnAcl < ActiveRecord::Base |
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
# Here is the Call model: | |
class Call < ActiveRecord::Base | |
include PimNormalizer | |
extend PimValidator | |
before_validation :normalize_state | |
belongs_to :clear_unit, :class_name=>"Member" | |
belongs_to :call_dispatcher | |
belongs_to :call_category |
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 Call < ActiveRecord::Base | |
# we need to override our date setters to ensure that we can accept the format provided | |
# by the forms | |
def time=(_time) | |
if _time.class == String | |
_time=DateTime.parse _time | |
end | |
p 'this is a test' |
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 Call < ActiveRecord::Base | |
before_destroy :check_associations | |
before_validation :normalize_state | |
before_save :normalize_times | |
belongs_to :clear_unit, :class_name=>"Member" | |
belongs_to :call_dispatcher | |
belongs_to :call_category |
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
!= form_for visit, :html => { :method => :delete, :loading_trigger => true, :loading_target => 'add_visit' } do |form| | |
%fieldset | |
%h3 | |
Delete Visit | |
%p | |
.form_field_error_messages | |
- errors = form.object.errors[:visit_date].join('; ') | |
- if ! errors.blank? | |
!= "Justification #{errors}. Please provide a reason for this modification." | |
!= label :comment, :comment, "Justification" |
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
source s_java{ | |
file("/var/log/api/api_access.log" multi-line-mode(indented) program_override("java") flags(no-parse) tags("api_access.log") log-iw-size(2000) log-fetch-limit(1000)); | |
file("/var/log/api/api_application.log" multi-line-mode(indented) program_override("java") flags(no-parse) tags("api_application.log") log-iw-size(2000) log-fetch-limit(1000)); | |
}; | |
destination d_java_redis { redis( command("LPUSH", "syslog", "${ISODATE} ${HOST}.stag.awse ${MSGHDR}${TAGS}: ${MSG}\n") host("redis_server_url") log-fifo-size(30000) ); }; | |
log { source(s_java); destination(d_java_redis); }; |
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
filter { | |
if "java-api" in [type] { | |
multiline { | |
pattern => "^%{TIMESTAMP_ISO8601}" | |
negate => true | |
what => "previous" | |
} | |
grok { | |
match => [ "message", "%{API_APPLICATION_LOG}" ] | |
overwrite => [ "message", "severity" ] |
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
module CustomDeploy | |
module CloudFrontHelper | |
... | |
def self.get_auth() | |
# put together our authentication | |
auth = {} | |
# # if we have set the access_key we add that in | |
auth = { | |
'AWS_ACCESS_KEY_ID' => node['traitify']['chef_testing_purposes']['aws_access_key_id'], | |
'AWS_SECRET_ACCESS_KEY' => node['traitify']['chef_testing_purposes']['aws_secret_access_key'] |
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
NoMethodError | |
------------- | |
undefined method `[]' for nil:NilClass | |
Cookbook Trace: | |
--------------- | |
/tmp/kitchen/cache/cookbooks/bob/recipes/dns.rb:52:in `block in from_file' | |
/tmp/kitchen/cache/cookbooks/bob/recipes/dns.rb:49:in `from_file' |
OlderNewer