Skip to content

Instantly share code, notes, and snippets.

View braidn's full-sized avatar
🏰
Storming

Braden Douglass braidn

🏰
Storming
View GitHub Profile
/opt/boxen/rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/bundler/gems/subdomain-fu-c6fbf945cf3f/lib/subdomain-fu.rb:86:in `host_without_subdomain'
/opt/boxen/rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/bundler/gems/subdomain-fu-c6fbf945cf3f/lib/subdomain-fu.rb:105:in `change_subdomain_of_host'
/opt/boxen/rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/bundler/gems/subdomain-fu-c6fbf945cf3f/lib/subdomain-fu.rb:92:in `rewrite_host_for_subdomains'
/opt/boxen/rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/bundler/gems/subdomain-fu-c6fbf945cf3f/lib/subdomain_fu/url_rewriter.rb:9:in `url_for_with_subdomains'
actionpack (3.2.13) lib/action_dispatch/routing/url_for.rb:148:in `url_for'
actionpack (3.2.13) lib/action_view/helpers/url_helper.rb:107:in `url_for'
actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:220:in `groups_url'
app/views/home/_banner_slider.html.haml:11:in `block in _app_views_home__banner_slider_html_haml___279637908628905529_70112076701240'
activerecord (3.2.13) lib/active_record/relation/
module Quarterly
class ContributorsReport
class SubscriptionPlanPresenter < SimpleDelegator
def next_issue_number
product.available_on? ? super : "N/A"
end
def next_issue_ships_on
product.available_on? ? super : "N/A"
end
module Quarterly
class ContributorsPerformanceReport
def initialize(context, search_params)
@context = context
@search_params = search_params
end
def render
@context.render(
'quarterly/reports/contributors_performance_report', locals: {
<%= search_form_for search, url: contributors_performance_admin_reports_path do |s| %>
<div class="date-range-filter field align-center">
<%= label_tag nil, t(:start), class: 'inline' %>
<%= s.text_field :created_at_gt, class: 'datepicker datepicker-from' %>
<span class="range-divider">
<i class="icon-arrow-right"></i>
</span>
<%= s.text_field :created_at_lt, class: 'datepicker datepicker-to' %>
// do some stuff with the breadcrumbs
$('ol.progress-steps > .current-first')
.after("<a href='#' class='bill_breadcrumb'><li class='completed-first'><span>Billing</span></li></a>")
.wrap("<a href='#' class='ship_breadcrumb'></a>")
$('input.submit_promo').on('click', function(e){
e.preventDefault();
if ($('#order_bill_address_attributes_firstname').val().length == 0) {
address.toggle();
address.toggle_bill_crumb();
<div class="four columns alpha" data-hook="shipping_fieldset_wrapper">
<fieldset id="gift-billing" data-hook>
<% if bill_address = spree_current_user.bill_address %>
<%= form.hidden_field :bill_address_id, :value => bill_address.id %>
<legend><%= t(:billing_address) %></legend>
<%= render 'spree/checkout/user_address', :address => bill_address %>
<p><%= link_to t(:edit), edit_bill_address_path(bill_address, return_to: request.fullpath) %></p>
<% else %>
<%= form.fields_for :bill_address do |bill_form| %>
<legend><%= t(:billing_address) %></legend>
module Quarterly
class GiftMailer < Spree::BaseMailer
def send_it(user, order, plan)
@user, @order, @plan = user, order, plan
subject = "#{Spree::Config[:site_name]} Your gift from #{@plan.name}"
mail(to: @order.gift_email, from: from_address, subject: subject)
end
handle_asynchronously :send_it,
:run_at => Proc.new { 2.minutes.from_now }
module Quarterly
class GiftMailerFactory
def self.create(args)
new.create(args)
end
def create
#do something that either produces data or
#instantiates another Class?
module Quarterly
class SecretController < ApplicationController
before_filter :authenticate
def coco
render 'pages/coco-music'
end
private
module Extensions
module Spree
module ProductsController
extend ActiveSupport::Concern
include do
alias_method_chain :accurate_title, :meta_title
end
def accurate_title_with_meta_title