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 Time | |
alias :minute :min | |
alias :second :sec | |
end | |
def assign_clicked_at | |
%w(year month day hour minute second).each do |date_part| | |
self.send("clicked_at_#{date_part}=", created_at.send(date_part)) | |
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
veez ~/code/rr09-team-128 (master)$ sudo gem install hashrocket-terraformation | |
Successfully installed hashrocket-terraformation-0.1.0 | |
1 gem installed | |
Installing ri documentation for hashrocket-terraformation-0.1.0... | |
File not found: lib | |
veez ~/code/rr09-team-128 (master)$ |
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
You can use either http://vurl-staging.heroku.com or http://vurl.me for the server name. | |
veez ~ $ curl --data vurl[url]=http%3A%2F%2Fthing.com http://vurl-staging.heroku.com/vurls.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<vurl> | |
<clicks-count type="integer">0</clicks-count> | |
<created-at type="datetime">2009-08-18T19:17:26-04:00</created-at> | |
<description></description> | |
<id type="integer">18</id> | |
<ip-address>127.0.0.1</ip-address> |
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
bill.description = if description = xml_document.at('titles/title[@type=official]') | |
description.text | |
end | |
bill.description = xml_document.at('titles/title[@type=official]') ? xml_document.at('titles/title[@type=official]').text : nil | |
bill.description = xml_document.at('titles/title[@type=official]') rescue nil | |
bill.description = description.text if description = xml_document.at('titles/title[@type=official]') |
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
def problem_kind_abbr | |
if problem_kind == "selection" | |
"PSS_" | |
elsif problem_kind == "selection" | |
"SER_" | |
else- | |
"???_" | |
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
def new_resource | |
resource = resource_service.new(params[resource_name]) | |
resource.user = current_user | |
resource | |
end |
NewerOlder