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
/Users/justin/.gem/ruby/2.1.2/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) | |
from /Users/justin/.gem/ruby/2.1.2/gems/activerecord-4.1.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection' | |
from /Users/justin/.gem/ruby/2.1.2/gems/activerecord-4.1.1/lib/active_record/connection_handling.rb:87:in `connection' | |
from /Users/justin/.gem/ruby/2.1.2/gems/activerecord-4.1.1/lib/active_record/model_schema.rb:214:in `columns' | |
from /Users/justin/.gem/ruby/2.1.2/gems/activerecord-4.1.1/lib/active_record/model_schema.rb:260:in `column_names' | |
from /Users/justin/.gem/ruby/2.1.2/gems/rd_searchlogic-3.0.1/lib/searchlogic/named_scopes/ordering.rb:61:in `ordering_condition_details' | |
from /Users/justin/.gem/ruby/2.1.2/gems/rd_searchlogic-3.0.1/lib/searchlogic/named_scopes/ordering.rb:52:in `method_missing' | |
from /Users/justin/.gem/ruby/2.1.2/gems/spree_core-0 |
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
define("simple-auth-devise/authenticators/devise", | |
["simple-auth/authenticators/base","simple-auth/utils/is-secure-url","simple-auth/utils/get-global-config","exports"], | |
function(__dependency1__, __dependency2__, __dependency3__, __exports__) { | |
"use strict"; | |
var Base = __dependency1__["default"]; | |
var isSecureUrl = __dependency2__["default"]; | |
var getGlobalConfig = __dependency3__["default"]; | |
var global = (typeof window !== 'undefined') ? window : {}, | |
Ember = global.Ember; |
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
Fetching git://github.com/spree/spree.git | |
Cloning into bare repository '/Users/justin/.gem/ruby/2.0.0/cache/bundler/git/spree-4a1e30487ca922b2bea76d92542b0fa510a960ea'... | |
remote: Reusing existing pack: 167510, done. | |
remote: Counting objects: 1192, done. | |
remote: Compressing objects: 100% (707/707), done. | |
remote: Total 168702 (delta 579), reused 801 (delta 362) | |
Receiving objects: 100% (168702/168702), 39.57 MiB | 2.32 MiB/s, done. | |
Resolving deltas: 100% (93043/93043), done. | |
Checking connectivity... done. | |
Cloning into '/Users/justin/.gem/ruby/2.0.0/bundler/gems/spree-61013cc29bd3'... |
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::UserRegistrationsController.class_eval do | |
layout "onboarding" | |
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
class Spree::Company < ActiveRecord::Base | |
belongs_to :vendor | |
belongs_to :state | |
belongs_to :country | |
belongs_to :trend_together | |
validates :name, presence: true, :if => :is_profile | |
validates :name, uniqueness: true, :if => :is_profile | |
validates :address, presence: true, :if => :is_profile |
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 Assetable | |
class Engine < ::Rails::Engine | |
config.generators.integration_tool :rspec | |
config.generators.test_framework :rspec | |
# Run the engine migrations with the main app rake task | |
initializer :append_migrations do |app| | |
unless app.root.to_s.match root.to_s | |
config.paths["db/migrate"].expanded.each do |expanded_path| | |
app.config.paths["db/migrate"] << expanded_path |
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::User.class_eval do | |
has_many :state_changes, as: :stateful | |
assetable :image | |
def apply_omniauth(omniauth) | |
if ["facebook", 'google_oauth2'].include? omniauth['provider'] | |
self.email = omniauth.fetch('info', {}).fetch('email', nil) if email.blank? | |
self.name = omniauth.fetch('info', {}).fetch('name', nil) if name.blank? | |
end | |
self.password = Devise.friendly_token[0,20] if password.blank? |
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
>> fval | |
=> 0.06 | |
>> send(:"plus_#{i}=", fval) | |
=> 0.06 | |
>> send(:"plus_#{i}") | |
=> 0 |
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 Model | |
attr_accessor :skip_callbacks | |
after_save :do_something | |
def do_something | |
unless skip_callbacks | |
# Do callback code. | |
end | |
end | |
end |