I had to patch the lib\login_engine.rb and add in the users table. My
problem was that when doing a migration (rake engine_migrate) I was only
getting _roles table created:

-- create_table("_roles", {:id=>false, :force=>true})

Here's the patched code - add config: user_table ... (x2)

module UserEngine

  #--
  # These are the default constants, used if nothing else is specified
  #++

  # The names of the new Role and Permission tables
  if ActiveRecord::Base.pluralize_table_names
    config :user_table, "users"
    config :role_table, "roles"
    config :permission_table, "permissions"
  else
    config :user_table, "user"
    config :role_table, "role"
    config :permission_table, "permission"
  end

  # Join tables for users <-> roles, and roles <-> permissions
  config :user_role_table,
"#{LoginEngine.config(:user_table)}_#{config(:role_table)}"
  config :permission_role_table,
"#{config(:permission_table)}_#{config(:role_table)}"


Note: this may have already been patched.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to