ruby on rails - rake: Best way of handling an undefined parameter? -
I found a rake work on a rail app that needs a parameter called USER_ID
I think I want to throw an exception that stops the execution. This is how my work looks like:
desc "My rake work" function: my_task = & gt; : Envionment user_id = ENV ["USER_ID"] or # thrown something here with # user_id stuff
what is happening on the code
about something like this:
raise "USER_ID Missing! \ N \ ne.g: my_task USER_ID = 6 "If (user_id = ENV ['USER_ID']) is empty?
Comments
Post a Comment