Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG::UndefinedColumn: ERROR: column users.id does not exist #710

Closed
afdev82 opened this issue Jan 19, 2015 · 0 comments · Fixed by #711
Closed

PG::UndefinedColumn: ERROR: column users.id does not exist #710

afdev82 opened this issue Jan 19, 2015 · 0 comments · Fixed by #711

Comments

@afdev82
Copy link
Contributor

afdev82 commented Jan 19, 2015

Hi everyone,
I 'm using my own user model with Alchemy CMS with custom defined "user_id" primary key.

I can login with my admin user, but I'm getting this error if I try to edit a page:
"PG::UndefinedColumn: ERROR: column users.id does not exist"

Alchemy: alchemy_cms (3.1.0.beta6 48db230)
Rails: rails (4.1.9)

This is the stack trace:

Started GET "/admin/pages/2/edit" for 127.0.0.1 at 2015-01-19 11:34:32 +0100
Processing by Alchemy::Admin::PagesController#edit as HTML
  Parameters: {"id"=>"2"}
  Alchemy::Site Load (0.3ms)  SELECT  "alchemy_sites".* FROM "alchemy_sites"  WHERE "alchemy_sites"."host" = '127.0.0.1'  ORDER BY "alchemy_sites"."id" ASC LIMIT 1
  Alchemy::Site Load (0.1ms)  SELECT "alchemy_sites".* FROM "alchemy_sites"
  Alchemy::Site Load (0.1ms)  SELECT  "alchemy_sites".* FROM "alchemy_sites"   ORDER BY "alchemy_sites"."id" ASC LIMIT 1
  Alchemy::Language Load (0.2ms)  SELECT  "alchemy_languages".* FROM "alchemy_languages"  WHERE "alchemy_languages"."site_id" = 1 AND "alchemy_languages"."id" = 1 LIMIT 1
  User Load (0.2ms)  SELECT  "system"."users".* FROM "system"."users"  WHERE "system"."users"."user_id" = 1  ORDER BY "system"."users"."user_id" ASC LIMIT 1
  Alchemy::Page Load (0.2ms)  SELECT  "alchemy_pages".* FROM "alchemy_pages"  WHERE "alchemy_pages"."id" = $1 LIMIT 1  [["id", 2]]
  Role Load (0.2ms)  SELECT  "system"."roles".* FROM "system"."roles"  WHERE "system"."roles"."role_id" = $1 LIMIT 1  [["role_id", 1]]
  User Load (0.8ms)  SELECT  "system"."users".* FROM "system"."users"  WHERE "system"."users"."id" IS NULL LIMIT 1
PG::UndefinedColumn: ERROR:  column users.id does not exist
LINE 1: ...  "system"."users".* FROM "system"."users"  WHERE "system"."...
                                                             ^
: SELECT  "system"."users".* FROM "system"."users"  WHERE "system"."users"."id" IS NULL LIMIT 1

PG::UndefinedColumn ERROR:  column users.id does not exist
LINE 1: ...  "system"."users".* FROM "system"."users"  WHERE "system"."...
                                                             ^
 in /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `async_exec'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `block in exec_no_cache'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/querying.rb:39:in `find_by_sql'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation.rb:611:in `exec_queries'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation.rb:493:in `load'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation.rb:238:in `to_a'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation/finder_methods.rb:460:in `find_take'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation/finder_methods.rb:98:in `take'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/relation/finder_methods.rb:81:in `find_by'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.9/lib/active_record/querying.rb:7:in `find_by'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/core_ext/object/try.rb:45:in `public_send'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/core_ext/object/try.rb:45:in `try'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/models/alchemy/page/page_users.rb:20:in `locker'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/controllers/alchemy/admin/pages_controller.rb:339:in `page_is_locked?'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/controllers/alchemy/admin/pages_controller.rb:63:in `edit'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.9/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.9/lib/abstract_controller/base.rb:189:in `process_action'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.9/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/actionpack-4.1.9/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:113:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:113:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `call'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in `block in halting'
/home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229:in `call'
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_toolbar_button.html.erb (0.1ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_search_form.html.erb (1.1ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/base/500.html.erb within layouts/alchemy/admin (3.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_routes.html.erb (0.7ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.6ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb (0.3ms)
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_sub_navigation.html.erb (0.7ms)
  Contact Load (0.3ms)  SELECT  "system"."contacts".* FROM "system"."contacts"  WHERE "system"."contacts"."user_id" = $1 LIMIT 1  [["user_id", 1]]
  Rendered /home/antonio/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/alchemy_cms-48db230db8a9/app/views/alchemy/admin/partials/_flash_notices.html.erb (0.1ms)
Completed 500 Internal Server Error in 397ms (Views: 385.1ms | ActiveRecord: 2.4ms)

Gemfile

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~>4.1.8'
gem 'rails-i18n', '~> 4.0.0'

# Use postgres as the database for Active Record
gem 'pg'

# Use Alchemy CMS for CMS
gem 'alchemy_cms', github: 'magiclabs/alchemy_cms', branch: 'master'

# Provide user authentication
gem 'devise', '~> 3.4'
gem 'devise-i18n'

# Handle roles and permissions
gem 'cancancan', '~> 1.10'

gem 'valid_email'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# gem 'jquery-turbolinks'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.4'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
# gem 'coffee-rails', '~> 4.0.0'

# Bootstrap
gem 'bootstrap-sass', '~> 3.3.0'
gem 'autoprefixer-rails'

# Font
gem 'font-awesome-rails'

# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'magnific-popup-rails', '~> 0.9.9'
gem 'videojs_rails'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#-gem 'therubyracer', :platforms => :ruby, :require => 'v8'
# gem 'prawn', '~> 1.2.1'
# gem 'prawn-templates'
# gem 'prawn-table'
# gem 'prawn_rails'
# gem 'prawn-svg', '< 0.16.0'
#-# WiceGrid to manage filters and pagination of collections
#-gem 'wice_grid', :git => 'git://github.com/leikind/wice_grid.git', :branch => 'rails3'

gem 'google-analytics-rails'
gem 'browsernizer'

group :development do
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'

  gem 'quiet_assets' # suppress assets pipeline logs
  #gem 'faker' # populate database with test data
  gem 'better_errors'
  gem 'binding_of_caller' #?
  gem 'rails_best_practices'
  gem 'brakeman', :require => false
  gem 'thin'
end

group :test do
  gem 'factory_girl_rails'
  gem 'simplecov', :require => false
end

group :production do
  # Use unicorn as the app server
  gem 'unicorn', :platforms => :ruby
  # Use dalli for caching
  gem 'dalli'
end

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.0'

# bundle exec rake doc:rails generates the API under doc/api.
# gem 'sdoc', '~> 0.4.0',          group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

Gemfile.lock

GIT
  remote: git://github.com/magiclabs/alchemy_cms.git
  revision: 48db230db8a9deb963b1ea9169b6f8086d6f6d3e
  branch: master
  specs:
    alchemy_cms (3.1.0.beta6)
      actionpack-page_caching (~> 1.0.0)
      active_model_serializers (>= 0.8.1, < 0.9.1)
      acts-as-taggable-on (~> 3.1)
      acts_as_list (~> 0.3)
      awesome_nested_set (~> 3.0.0)
      cancancan (~> 1.9)
      coffee-rails (~> 4.0)
      compass-rails (~> 1.1)
      dragonfly (~> 1.0.1)
      jquery-rails (~> 3.1.0)
      jquery-ui-rails (~> 5.0.0)
      kaminari (~> 0.15)
      magiclabs-userstamp (~> 2.1.0)
      non-stupid-digest-assets (~> 1.0.3)
      rails (>= 4.0, < 4.2)
      request_store (~> 1.1.0)
      sass-rails (~> 4.0)
      sassy-buttons (~> 0.2.6)
      select2-rails (>= 3.5.9.1, < 4.0)
      simple_form (~> 3.0)
      spinner.rb
      turbolinks (~> 2.5)
      tvdeyen-handles_sortable_columns (~> 0.1.5)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.9)
      actionpack (= 4.1.9)
      actionview (= 4.1.9)
      mail (~> 2.5, >= 2.5.4)
    actionpack (4.1.9)
      actionview (= 4.1.9)
      activesupport (= 4.1.9)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionpack-page_caching (1.0.2)
      actionpack (>= 4.0.0, < 5)
    actionview (4.1.9)
      activesupport (= 4.1.9)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    active_model_serializers (0.9.0)
      activemodel (>= 3.2)
    activemodel (4.1.9)
      activesupport (= 4.1.9)
      builder (~> 3.1)
    activerecord (4.1.9)
      activemodel (= 4.1.9)
      activesupport (= 4.1.9)
      arel (~> 5.0.0)
    activesupport (4.1.9)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    acts-as-taggable-on (3.4.3)
      activerecord (>= 3.2, < 5)
    acts_as_list (0.6.0)
      activerecord (>= 3.0)
    addressable (2.3.6)
    arel (5.0.1.20140414130214)
    autoprefixer-rails (5.0.0)
      execjs
    awesome_nested_set (3.0.2)
      activerecord (>= 4.0.0, < 5)
    awesome_print (1.6.1)
    bcrypt (3.1.9)
    better_errors (2.1.1)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
      rack (>= 0.9.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (3.3.1.0)
      sass (~> 3.2)
    brakeman (3.0.0)
      erubis (~> 2.6)
      fastercsv (~> 1.5)
      haml (>= 3.0, < 5.0)
      highline (~> 1.6.20)
      multi_json (~> 1.2)
      ruby2ruby (~> 2.1.1)
      ruby_parser (~> 3.5.0)
      sass (~> 3.0)
      slim (>= 1.3.6, < 3.0)
      terminal-table (~> 1.4)
    browser (0.8.0)
    browsernizer (0.2.3)
      browser (> 0.1.4)
    builder (3.2.2)
    cancancan (1.10.1)
    chunky_png (1.3.3)
    code_analyzer (0.4.5)
      sexp_processor
    coderay (1.1.0)
    coffee-rails (4.1.0)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.8.0)
    colored (1.2)
    compass (0.12.7)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.2.19)
    compass-rails (1.1.6)
      compass (>= 0.12.2)
    daemons (1.1.9)
    dalli (2.7.2)
    debug_inspector (0.0.2)
    devise (3.4.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    devise-i18n (0.11.3)
    docile (1.1.5)
    dragonfly (1.0.7)
      addressable (~> 2.3)
      multi_json (~> 1.0)
      rack
    erubis (2.7.0)
    eventmachine (1.0.4)
    execjs (2.2.2)
    factory_girl (4.5.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.5.0)
      factory_girl (~> 4.5.0)
      railties (>= 3.0.0)
    fastercsv (1.5.5)
    font-awesome-rails (4.2.0.0)
      railties (>= 3.2, < 5.0)
    fssm (0.2.10)
    google-analytics-rails (0.0.6)
    haml (4.0.6)
      tilt
    highline (1.6.21)
    hike (1.2.3)
    i18n (0.7.0)
    jquery-rails (3.1.2)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (5.0.3)
      railties (>= 3.2.16)
    json (1.8.2)
    kaminari (0.16.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    kgio (2.9.3)
    magiclabs-userstamp (2.1.0)
    magnific-popup-rails (0.9.9.1)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.4.3)
    minitest (5.5.1)
    multi_json (1.10.1)
    non-stupid-digest-assets (1.0.4)
    orm_adapter (0.5.0)
    pg (0.18.1)
    quiet_assets (1.1.0)
      railties (>= 3.1, < 5.0)
    rack (1.5.2)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.1.9)
      actionmailer (= 4.1.9)
      actionpack (= 4.1.9)
      actionview (= 4.1.9)
      activemodel (= 4.1.9)
      activerecord (= 4.1.9)
      activesupport (= 4.1.9)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.9)
      sprockets-rails (~> 2.0)
    rails-i18n (4.0.3)
      i18n (~> 0.6)
      railties (~> 4.0)
    rails_best_practices (1.15.4)
      activesupport
      awesome_print
      code_analyzer (>= 0.4.3)
      colored
      erubis
      i18n
      json
      require_all
      ruby-progressbar
    railties (4.1.9)
      actionpack (= 4.1.9)
      activesupport (= 4.1.9)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    raindrops (0.13.0)
    rake (10.4.2)
    request_store (1.1.0)
    require_all (1.3.2)
    responders (1.1.2)
      railties (>= 3.2, < 4.2)
    ruby-progressbar (1.7.1)
    ruby2ruby (2.1.3)
      ruby_parser (~> 3.1)
      sexp_processor (~> 4.0)
    ruby_parser (3.5.0)
      sexp_processor (~> 4.1)
    sass (3.2.19)
    sass-rails (4.0.4)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.2)
      sprockets (~> 2.8, < 2.12)
      sprockets-rails (~> 2.0)
    sassy-buttons (0.2.6)
      compass (>= 0.12.2)
    select2-rails (3.5.9.1)
      thor (~> 0.14)
    sexp_processor (4.4.4)
    simple_form (3.1.0)
      actionpack (~> 4.0)
      activemodel (~> 4.0)
    simplecov (0.9.1)
      docile (~> 1.1.0)
      multi_json (~> 1.0)
      simplecov-html (~> 0.8.0)
    simplecov-html (0.8.0)
    slim (2.1.0)
      temple (~> 0.6.9)
      tilt (>= 1.3.3, < 2.1)
    spinner.rb (0.3.0)
    spring (1.2.0)
    sprockets (2.11.3)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.2.2)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    temple (0.6.10)
    terminal-table (1.4.5)
    thin (1.6.3)
      daemons (~> 1.0, >= 1.0.9)
      eventmachine (~> 1.0)
      rack (~> 1.0)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    turbolinks (2.5.3)
      coffee-rails
    tvdeyen-handles_sortable_columns (0.1.5)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.7.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    unicorn (4.8.3)
      kgio (~> 2.6)
      rack
      raindrops (~> 0.7)
    valid_email (0.0.10)
      activemodel
      mail (~> 2.6.1)
    videojs_rails (4.6.1)
    warden (1.2.3)
      rack (>= 1.0)

PLATFORMS
  ruby

DEPENDENCIES
  alchemy_cms!
  autoprefixer-rails
  better_errors
  binding_of_caller
  bootstrap-sass (~> 3.3.0)
  brakeman
  browsernizer
  cancancan (~> 1.10)
  dalli
  devise (~> 3.4)
  devise-i18n
  factory_girl_rails
  font-awesome-rails
  google-analytics-rails
  jquery-rails
  jquery-ui-rails
  magnific-popup-rails (~> 0.9.9)
  pg
  quiet_assets
  rails (~> 4.1.8)
  rails-i18n (~> 4.0.0)
  rails_best_practices
  sass-rails (~> 4.0.4)
  simplecov
  spring
  thin
  uglifier (>= 1.3.0)
  unicorn
  valid_email
  videojs_rails

tvdeyen pushed a commit that referenced this issue Jan 19, 2015
The primary key to find `page.creator`, `page.updater` and `page.locker` is hard coded to `:id`, this fixes this by using the `primary_key` class method, that the user class provides (ie. ActiveRecord based classes).

Closes #710
tvdeyen added a commit to tvdeyen/alchemy_cms that referenced this issue Jan 7, 2020
After we merged 24bef77 we force
Rails to connect to the database whenever we eager load the page class.

Instead we introduce a config so users with Userclass primary keys
different than :id can set it.

Refs AlchemyCMS#710
Refs AlchemyCMS#711
Refs AlchemyCMS#1658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant