You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #513, I proposed extension API for commands, but it doesn't cover all the extension needs. For example, Rails defines controller and helpers methods (and these methods too) for its Rails console, which are meant to be used as methods and be chained with other method calls. So they should not be treated as commands.
However, helper methods do share some common needs with commands, like:
Feature discovery, e.g. can be listed in the result of show_cmds (or help in the future)
moduleIRBmoduleHelperclassController < Helper::Basecategory"Rails"description"Gets a new instance of a controller object."defexecute@controller ||= ApplicationController.newendendendendIRB::ExtendedCommandBundle.add_helper(:controller,IRB::Helper::Controller)
The text was updated successfully, but these errors were encountered:
In #513, I proposed extension API for commands, but it doesn't cover all the extension needs. For example, Rails defines
controller
andhelpers
methods (and these methods too) for its Rails console, which are meant to be used as methods and be chained with other method calls. So they should not be treated as commands.However, helper methods do share some common needs with commands, like:
show_cmds
(orhelp
in the future)So I think we should provide (perhaps similar) extension for helper methods to fulfill such needs.
Details
Using Rails'
controller
helper as example:The text was updated successfully, but these errors were encountered: