Skip to content

Instantly share code, notes, and snippets.

View gaaady's full-sized avatar

Gady gaaady

  • Opinya
  • Israel
View GitHub Profile
https://speakerdeck.com/bdq/e-commerce-ireland-introduction-to-spree-commerce
https://speakerdeck.com/martin_91/spree-framework-overview
https://speakerdeck.com/bdq/spree-commerce-hub-technical-summary
https://github.com/spree/spree
http://guides.spreecommerce.com/developer/
http://spreecommerce.com/storefront
http://guides.spreecommerce.com/developer/payments.html#supported-gateways
https://github.com/influitive/apartment
http://www.postgresql.org/docs/9.3/static/ddl-schemas.html
http://confreaks.com/videos/111-aac2009-writing-multi-tenant-applications-in-rails
@gaaady
gaaady / gist:4499983
Created January 10, 2013 06:35
rails_admin error
- Hello, RailsAdmin installer will help you set things up!
- I need to work with Devise, let's look at a few things first:
- Checking for a current installation of devise...
- Found it!
- Looks like you've already installed it, good!
? Where do you want to mount rails_admin? Press <enter> for [admin] >
gsub config/routes.rb
route mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
- And you already set it up, good! We just need to know about your user model name...
- We found 'user' (should be one of 'user', 'admin', etc.)
@gaaady
gaaady / gist:3992330
Created November 1, 2012 07:36
Airbrake social stream error
/Users/username/.rvm/gems/ruby-1.9.3-p0@Project/bundler/gems/social_stream-b3739bfc7dbf/base/lib/social_stream/models/subject.rb:32:in `block in <module:Subject>': undefined method `alphabetic' for Actor:Class (NoMethodError)
from /Users/username/.rvm/gems/ruby-1.9.3-p0@Project/gems/activesupport-3.2.8/lib/active_support/concern.rb:119:in `class_eval'
from /Users/username/.rvm/gems/ruby-1.9.3-p0@Project/gems/activesupport-3.2.8/lib/active_support/concern.rb:119:in `append_features'
from /Users/username/Code/Rails/Project/app/models/user.rb:4:in `include'
from /Users/username/Code/Rails/Project/app/models/user.rb:4:in `<class:User>'
from /Users/username/Code/Rails/Project/app/models/user.rb:1:in `<top (required)>'
from /Users/username/.rvm/gems/ruby-1.9.3-p0@Project/gems/zeus-0.12.0/lib/zeus/load_tracking.rb:50:in `load'
from /Users/username/.rvm/gems/ruby-1.9.3-p0@Project/gems/zeus-0.12.0/lib/zeus/load_tracking.rb:50:in `load'
from /Users/username/.rvm/gems/ruby-1.9.3-p0@Project/gems/activesup
@gaaady
gaaady / gist:1505960
Created December 21, 2011 13:01
Rails admin exception
NameError in Rails_admin/main#new
Showing /Users//.rvm/gems/ruby-1.9.2-p290@/bundler/gems/rails_admin-63876182c6f5/app/views/rails_admin/main/new.html.haml where line #1 raised:
uninitialized constant NestedForm::BuilderMixin
Extracted source (around line #1):
1: = rails_admin_form_for @object, :url => create_path(:model_name => @abstract_model.to_param, :id => @object.id), :html => { :multipart => true, :data => { :title => @page_name } } do |form|
2: = form.generate :action => :create
class FollowsController < ApplicationController
def create
@followable = find_followable
current_user.follow(@followable)
redirect_to (@followable)
end
def destroy
@followable = find_followable
class FollowsController < ApplicationController
def create
@user = User.find(params[:brewer_id])
current_user.follow(@user)
end
def destroy
@user = User.find(params[:brewer_id])
current_user.stop_following(@user)