Ruby on Rails
Monday, February 6, 2017
This works perfectly if inserted in the application-block.
-- Thanks alot.
Am Montag, 6. Februar 2017 15:53:45 UTC+1 schrieb Frederick Cheung:
Am Montag, 6. Februar 2017 15:53:45 UTC+1 schrieb Frederick Cheung:
On Monday, February 6, 2017 at 9:41:49 AM UTC, hartmut bischoff wrote:Hi everbody,I am working on a Rails Project using OrientDB as Database ( https://github.com/topofocus/active-orient )This gem initializes any available database-class and assigns it to model-classes.For me its convenient to recognize, which database-classes are found, when starting the console.Thus I patched the source in railties/rails/lib/commands/console.rb Obviously, I am not happy with this dirty approach.How is this done properly?in detail:I want to execute some ruby-code after any initialization of the core and before the first command can be entered.This code prints out some status information.In application.rb you can putconsole do#only executed when booting consoleendWe use this to inject some helper methods into console sessionsFred
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e13a6876-3efd-4ac2-a644-9d035b79846b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment