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
| child :payments => :payments do | |
| attributes :id, :amount, :state, :payment_method_id | |
| child :payment_method => :payment_method do | |
| attributes :id, :name, :environment | |
| 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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.8' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'mysql2' | |
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
| <!DOCTYPE html> | |
| <%= render '/refinery/html_tag' %> | |
| <% site_bar = render('/refinery/site_bar', :head => true) -%> | |
| <%= render '/refinery/head' %> | |
| <body id='<%= canonical_id @page %>'> | |
| <%= site_bar -%> | |
| <%= render '/refinery/ie6check' if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%> | |
| <div id="page_container"> | |
| <header id="header"> | |
| <%= render '/refinery/header' -%> |
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
| no <down> <Nop> | |
| no <left> <Nop> | |
| no <right> <Nop> | |
| no <up> <Nop> | |
| ino <down> <Nop> | |
| ino <left> <Nop> | |
| ino <right> <Nop> | |
| ino <up> <Nop> | |
| vno <down> <Nop> | |
| vno <left> <Nop> |
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
| From 6e07361e1dc08ace0fd38d39067d0d7e3da11e9c Mon Sep 17 00:00:00 2001 | |
| From: Ryan Bigg <radarlistener@gmail.com> | |
| Date: Thu, 14 Jun 2012 11:10:01 +1000 | |
| Subject: [PATCH] Explicitly define scopes as being searchable This stops | |
| people using class methods or scopes that shouldn't be used | |
| for searching. | |
| Props to joernchen from Phenoelit for informing us about this! | |
| Remove conditions_any scope and use ARel query building instead |
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
| From 03c3f527b01951900aa88e2bd3bfd23fc1400f86 Mon Sep 17 00:00:00 2001 | |
| From: Ryan Bigg <radarlistener@gmail.com> | |
| Date: Thu, 14 Jun 2012 16:58:53 +1000 | |
| Subject: [PATCH] Explicitly define scopes as being searchable This stops | |
| people using class methods or scopes that shouldn't be used | |
| for searching. | |
| Props to joernchen from Phenoelit for informing us about this! | |
| --- | |
| app/models/product.rb | 9 +++++++++ |
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
| test |
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
| Spree::Order.class_eval do | |
| def generate_order_number | |
| self.number = "R#{Time.now.year}#{Time.now.month}#{Time.now.day}#{Array.new(4){rand(9)}.join}" if self.number.blank? | |
| self.number | |
| 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
| Deface::Override.new(:virtual_path => "spree/products/_cart_form", | |
| :name => "example-1", | |
| :replace => ".add-to-cart", | |
| :text => %{ <% if @product.has_stock? || Spree::Config[:allow_backorders] %> | |
| <%= number_field_tag (@product.has_variants? ? :quantity : "variants[#\{@product.master.id\}]"), | |
| 1, :class => 'title', :in => 1..@product.on_hand %> | |
| <%= image_submit_tag("login.png") %> | |
| <% else %> | |
| <%= content_tag('strong', t(:out_of_stock)) %> | |
| <% 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
| Deface::Override.new(:virtual_path => "spree/products/_cart_form", | |
| :name => "example-1", | |
| :replace => ".add-to-cart", | |
| :text => %{ <% if @product.has_stock? || Spree::Config[:allow_backorders] %> | |
| <%= number_field_tag (@product.has_variants? ? :quantity : "variants[#\{@product.master.id\}]"), | |
| 1, :class => 'title', :in => 1..@product.on_hand %> | |
| <input type="image" src="rainbow.gif" name="image" width="60" height="60"> | |
| <% else %> | |
| <%= content_tag('strong', t(:out_of_stock)) %> | |
| <% end %>}) |