DEV Community

n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on

Using if condition in yml for rails

We can write a condition in a yml for rails like this.

config/setting.yml

  address: '<%= Date.today < Date.new(2020, 12, 1) ? "Tokyo" : "Osaka" %>'
Enter fullscreen mode Exit fullscreen mode

Top comments (0)