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
<httpHandlers> | |
<add verb="*" path="BuiltJS" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework"/> | |
</httpHandlers> |
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 filter_url_helper(filter_key, filter_value) | |
product_group_query = params[:product_group_query] != nil ? Array.new(params[:product_group_query]) : nil | |
if product_group_query == nil | |
return "/t/#{params[:id].join('/')}/s/#{filter_key}/#{filter_value}" | |
end | |
if product_group_query.index(filter_key) == nil | |
return "/t/#{params[:id].join('/')}/s/#{product_group_query.join('/')}/#{filter_key}/#{filter_value}" | |
else | |
product_group_query[product_group_query.index(filter_key)+1] = filter_value |
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
InheritedResources::BaseHelpers.module_eval do | |
def resource | |
get_resource_ivar || end_of_association_chain.respond_to?('by_slug') ? set_resource_ivar(end_of_association_chain.by_slug(params[:id])) : set_resource_ivar(end_of_association_chain.find(params[:id])) | |
end | |
def collection | |
get_collection_ivar || set_collection_ivar(end_of_association_chain.all) | |
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
Dir[Rails.root.join("vendor/game_types/**/app/stylesheets")].each do |sass_folder| | |
Sass::Plugin.add_template_location( | |
sass_folder, | |
sass_folder + '/../../public/stylesheets' | |
) | |
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
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) | |
growlnotify = `which growlnotify`.chomp | |
title = "Watchr Test Results" | |
puts message | |
image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
system %(#{growlnotify} #{options} &) |
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
for num in [1..starValue] |
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
//tr[th[text()="[email protected]"]]/descendant::a[normalize-space(text())='Delete'] |
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 packages(order) | |
split_packages = Array.new | |
number_of_packages = 1 | |
multiplier = Spree::ActiveShipping::Config[:unit_multiplier] | |
default_weight = Spree::ActiveShipping::Config[:default_weight] | |
weight = order.line_items.inject(0) do |weight, line_item| | |
item_weight = line_item.variant.weight.present? ? line_item.variant.weight : default_weight | |
weight + (line_item.quantity * item_weight * multiplier) |
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
return GoCardless.new_pre_authorization_url amount: Settings.max_variable_direct_debit_amount, name: order.name, interval_unit: "month", interval_length: 12, state: member.id, | |
user: { | |
first_name: member.first_name, | |
last_name: member.last_name, | |
email: member.email, | |
billing_address1: member.correspondence_address_line_1, | |
billing_address2: member.correspondence_address_line_2, | |
billing_town: member.correspondence_address_city, | |
billing_postcode: member.correspondence_address_postcode | |
} |
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
package uk.co.cd4i.cityplan.domain.mongo | |
import java.util.Date | |
import com.novus.salat.annotations._ | |
import com.novus.salat.dao.SalatDAO | |
import com.mongodb.casbah.Imports._ | |
import com.novus.salat.global._ | |
case class Milestone ( | |
@Key("_id") id: Object = new ObjectId, |
OlderNewer