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)

🌙 Dark Mode?!

Turn it on in Settings