Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6781 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

[PATCH] Extend console helper to load application-specific helper files

Reported by: Chris Wanstrath Assigned to: nzkoz
Priority: normal Milestone: 1.x
Component: ActiveRecord Version: edge
Severity: minor Keywords: console
Cc:

Description

Patch modifies the helper script/console method to accept a symbol representing an application-specific helper file, which it then extends helper with. Mimics the ActionController helper method.

Something like

>> helper :recipes

will extend helper with all the methods from the RecipeHelper module.

Can also take multiple symbols:

>> helper :recipes, :stories

Automatically tries to load ApplicationHelper on script/console startup. (helper :application)

Works best with the fix in #6774.

Attachments

console_helper_can_load_helper_files.diff (0.6 kB) - added by Chris Wanstrath on 12/07/06 05:04:29.
The patch

Change History

12/07/06 05:04:29 changed by Chris Wanstrath

  • attachment console_helper_can_load_helper_files.diff added.

The patch

01/12/07 01:02:35 changed by nzkoz

  • owner changed from core to nzkoz.
  • status changed from new to assigned.

10/07/07 03:08:12 changed by nzkoz

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [7765]) Extend the console +helper+ method to allow you to include custom helpers. Closes #6781 [Chris Wanstrath]