Changeset 7765
- Timestamp:
- 10/07/07 03:08:08 (10 months ago)
- Files:
-
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/lib/console_with_helpers.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r7718 r7765 1 1 *SVN* 2 3 * Extend the console +helper+ method to allow you to include custom helpers. e.g: 4 >> helper :posts 5 >> helper.some_method_from_posts_helper(Post.find(1)) 2 6 3 7 * db:create works with remote databases whereas db:create:all only creates trunk/railties/lib/console_with_helpers.rb
r4019 r7765 11 11 end 12 12 13 def helper 14 @helper_proxy ||= Object.new 13 def helper(*helper_names) 14 returning @helper_proxy ||= Object.new do |helper| 15 helper_names.each { |h| helper.extend "#{h}_helper".classify.constantize } 16 end 15 17 end 16 18 … … 22 24 23 25 @controller = ApplicationController.new 26 helper :application rescue nil