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
class Rating < ActiveRecord::Base | |
belongs_to :thing, :polymorphic => true | |
end | |
class Comment < ActiveRecord::Base | |
has_many :ratings | |
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
.0/lib/ruby/2.1.0/bigdecimal/util.rb:18: [BUG] Segmentation fault at 0x00000000000000 | |
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0] | |
-- Crash Report log information -------------------------------------------- | |
See Crash Report log file under the one of following: | |
* ~/Library/Logs/CrashReporter | |
* /Library/Logs/CrashReporter | |
* ~/Library/Logs/DiagnosticReports | |
* /Library/Logs/DiagnosticReports | |
for more details. |
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 more_products_link | |
object = @store || @tag || @collection | |
link_to 'Load More Products', [object, :view], :class => 'load-more-products', :remote => true if @products.next_page | |
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
[4] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> response.error | |
=> [:base, "Transaction was refused."] | |
[5] pry(#<RSpec::Core::ExampleGroup::Nested_1>)> response.refusal_reason | |
=> "Refused" |
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
Spree::TaxonsController.class_eval do | |
def show | |
@taxon = Taxon.find_by_permalink!(params[:id]) | |
return unless @taxon | |
@searcher = build_searcher(params.merge(:taxon => @taxon.id)) | |
@products = @searcher.retrieve_products.descend_by_master_price | |
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
{ | |
products: [ | |
{ | |
name: 'Foo', | |
option_type_ids: [1,2,3] | |
} | |
], | |
option_types: [ | |
{ id: 1, name: 'Bar' }, | |
{ id: 2, name: 'Baz' }, |
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
spree (fcfc846...)⸘ git tag --contains 5fa46a5a3f30c14c1f464266234337411136aafd | |
v2.0.5 | |
v2.0.6 | |
v2.0.7 | |
v2.0.8 |
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
respond_to do |format| | |
format.all { render :json => thing } | |
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
Jbuilder.encode do |json| | |
json.array! @products do |product| | |
json.name product.name |
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
//= require jquery | |
//= require handlebars | |
//= require ember | |
//= require ember-data | |
//= require spree | |
Spree.App = Ember.Application.create() | |
DS.RESTAdapter.reopen | |
namespace: 'api' |
OlderNewer