Changeset 268
- Timestamp:
- 02/11/06 07:40:40 (3 years ago)
- Files:
-
- login_engine/branches/rb_1.0/CHANGELOG (modified) (1 diff)
- login_engine/branches/rb_1.0/db/migrate/001_initial_schema.rb (modified) (1 diff)
- login_engine/branches/rb_1.0/init_engine.rb (modified) (1 diff)
- login_engine/branches/rb_1.0/lib/login_engine.rb (modified) (1 diff)
- login_engine/branches/rb_1.0/lib/login_engine/authenticated_user.rb (modified) (1 diff)
- login_engine/branches/rb_1.0/test/functional/user_controller_test.rb (modified) (1 diff)
- login_engine/branches/rb_1.0/test/unit/user_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
login_engine/branches/rb_1.0/CHANGELOG
r247 r268 1 SVN 1 *SVN* 2 2 3 1.0.1 4 3 - Default table names now respect any set prefix/suffix from ActiveRecord (Ticket #67) 5 4 - Removed errant closing DIV tag in views/user/edit.rhtml (Ticket #68) 6 5 - do_delete_user() should delete the user given as a parameter, not @user (Ticket #65) login_engine/branches/rb_1.0/db/migrate/001_initial_schema.rb
r106 r268 1 1 class InitialSchema < ActiveRecord::Migration 2 2 def self.up 3 # NOTE that we don't need to wrap the table name here, since Migrations 4 # will do it whether we want it to or not. 3 5 create_table LoginEngine.config(:user_table), :force => true do |t| 4 6 t.column "login", :string, :limit => 80, :default => "", :null => false login_engine/branches/rb_1.0/init_engine.rb
r201 r268 3 3 require 'login_engine' 4 4 5 # TODO: why do I have to include these here, when including them in login_engine.rb should be sufficient? 6 #require 'authenticated_user' 7 #require 'authenticated_system' 5 module ::LoginEngine::Version 6 Major = 1 # change implies compatibility breaking with previous versions 7 Minor = 0 # change implies backwards-compatible change to API 8 Release = 1 # incremented with bug-fixes, updates, etc. 9 end 8 10 11 Engines.current.version = LoginEngine::Version 12 13 # send the helpers and modules automatically....? 9 14 #ApplicationController.send(:include, LoginEngine) 10 15 #ApplicationHelper.send(:include, LoginEngine) login_engine/branches/rb_1.0/lib/login_engine.rb
r201 r268 52 52 config :user_table, "user" 53 53 end 54 54 55 55 # controls whether or not email is used 56 56 config :use_email_notification, true login_engine/branches/rb_1.0/lib/login_engine/authenticated_user.rb
r192 r268 9 9 base.class_eval do 10 10 11 # use the table name given 12 set_table_name LoginEngine.config(:user_table) 11 # use the table name given. NOTE that this will wrap the table name 12 # using the set prefix/suffix. TODO: this behaviour isn't ideal, but it 13 # is necessary since migrations will ALWAYS wrap using the prefix/suffix. 14 # To explicitly and COMPLETELY set a unique table name, create a version 15 # of the User model in your own application and use set_table_name there. 16 set_table_name wrapped_table_name(LoginEngine.config(:user_table)) 13 17 14 18 attr_accessor :new_password login_engine/branches/rb_1.0/test/functional/user_controller_test.rb
r128 r268 10 10 # load the fixture into the developer-specified table using the custom 11 11 # 'fixture' method. 12 fixture :users, :table_name => LoginEngine.config(:user_table), :class_name => "User" 12 fixture :users, :class_name => "User", 13 :table_name => ActiveRecord::Base.wrapped_table_name(LoginEngine.config(:user_table)) 13 14 14 15 def setup login_engine/branches/rb_1.0/test/unit/user_test.rb
r107 r268 3 3 4 4 # load the fixture into the developer-specified table using the custom 5 # 'fixture' method. 6 fixture :users, :table_name => LoginEngine.config(:user_table), :class_name => "User" 5 # 'fixture' method. Note that it is necessary at the moment to explicitly 6 # wrap the table name. TODO: determine the table name from the Class object. 7 fixture :users, :class_name => "User", 8 :table_name => ActiveRecord::Base.wrapped_table_name(LoginEngine.config(:user_table)) 7 9 8 10 def setup
