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
#! /bin/sh | |
# Generic script for running ruby scripts as daemons using | |
# jsvc and a java class to control the daemon. | |
# | |
# Contains common parameters and start/stop | |
# Things you'll need to set on a per script/daemon basis: | |
# SCRIPT_NAME - Path to the ruby script which creates a Daemon | |
# object for jsvc to control | |
# APP_NAME - Name of your application |
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
# report.rb | |
# Aliased below. This will check for existing ReportDetail with matching attributes (all of them) | |
# And if it exists, set the ID, otherwise, set the report_period_detail object using the original method | |
# Not sure if there is some Railsy way of doing this... | |
def report_detail_with_find(attrs) | |
report_detail = ReportDetail.find_or_create_by_duration_and_display_duration_and_starting_month_and_period_offset(attrs[:duration],attrs[:display_duration],attrs[:starting_month],attrs[:period_offset]) | |
report_detail_without_find(report_detail) | |
end |
NewerOlder