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
/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/ |
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
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 |
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
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: { |
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
<%= 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' %> |
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
// 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(); |
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
<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> |
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
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 } |
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
module Quarterly | |
class GiftMailerFactory | |
def self.create(args) | |
new.create(args) | |
end | |
def create | |
#do something that either produces data or | |
#instantiates another Class? |
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
module Quarterly | |
class SecretController < ApplicationController | |
before_filter :authenticate | |
def coco | |
render 'pages/coco-music' | |
end | |
private |
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
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 |