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 memo[/notification/] | |
Notifications.send_receipt = false | |
Notifications.deliver_recruitment(params['recruitment']) | |
Notifications.send_receipt = false | |
Notifications.deliver_notification_for_resourcing(params['recruitment']) | |
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
require File.dirname(__FILE__) + '/../spec_helper' | |
require File.dirname(__FILE__) + '/../../app/models/notifications' | |
class Notifications | |
def self.spec_new(method_name,*parameters) | |
n = self.allocate | |
n.__send__ :initialize_defaults, method_name | |
yield(n) if block_given? | |
n.__send__(method_name, *parameters) | |
return n |
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 Date | |
def to_words | |
today = Date.today | |
case self | |
when today | |
"Today" | |
when today - 1 | |
"Yesterday" | |
when today + 1 |
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
def self.next(username) | |
list = find(:all,:order => 'last_name') | |
list[list.index {|u| u.username == username}+1] | |
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
.note | |
This information comes from LDAP. To edit it, | |
=link_to 'please click here', 'http://people.rsp.com.au' |
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
named_scope :with_group, lambda {|group| | |
{:conditions => {:group_id => group.id, :group_type => group.class.base_class.name.to_s}} | |
} |
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 User < ActiveRecord::Base | |
has_many :contracts | |
... | |
end | |
class Contract < ActiveRecord::Base | |
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
/´¯/) | |
,/¯ / | |
/ / | |
/´¯/' '/´¯¯`·¸ | |
/'/ / / /¨¯\ | |
('( ´ ´ ¯~/' ') | |
\ ' / | |
'' \ _ ·´ | |
\ ( | |
\ \ |
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 RAILS_ENV == 'production' %> | |
<%= javascript_include_tag 'console_stub' | |
<% 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
def load_rails_plugin(name) | |
Merb::BootLoader.before_app_loads do | |
root = Merb.root / "lib" / name | |
puts "root: #{root}" | |
$: << (root / 'lib') | |
Dependencies.load_paths << (root / 'lib') | |
require root / "init.rb" | |
end |
OlderNewer