Skip to main content
added 37 characters in body; edited tags; edited title
Source Link
Sebastián Palma
  • 33.6k
  • 6
  • 45
  • 65

how How to detect whether my railscheck if Rails code is running inwithin a migration or not in environment.rb

anyIs there some easy way to detect it? 

I want to skip some codescode in the envirmonment.rb file when doing migrationthe rake/rails migrations are running.

how to detect whether my rails is running in migration or not in environment.rb

any easy way to detect it? I want to skip some codes in envirmonment.rb when doing migration rake.

How to check if Rails code is running within a migration

Is there some easy way to detect it? 

I want to skip some code in the envirmonment.rb file when the rake/rails migrations are running.

edited tags
Link
Aeon
  • 6.5k
  • 5
  • 32
  • 31
deleted 1 characters in body; edited tags; edited title
Source Link
Simone Carletti
  • 177.3k
  • 50
  • 371
  • 370

how to detect whether my rails is runningrunning in migration or not in envirmonmentenvironment.rb

any easy way to detect it? I want to skip some codes in envirmonmentenvirmonment.rb when doing migration rake.

how to detect whether my rails is running in migration or not in envirmonment.rb

any easy way to detect it? I want to skip some codes in envirmonment.rb when doing migration rake.

how to detect whether my rails is running in migration or not in environment.rb

any easy way to detect it? I want to skip some codes in envirmonment.rb when doing migration rake.

Source Link
user199403
  • 483
  • 1
  • 6
  • 11
Loading