This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| image: ghcr.io/cirruslabs/flutter:latest | |
| stages: | |
| - test | |
| - deploy | |
| unit_tests: | |
| stage: test | |
| cache: | |
| - key: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Setting < ApplicationRecord | |
| validates :key, presence: true, uniqueness: true | |
| # Getter for type casting | |
| def typed_value | |
| case value_type | |
| when "integer" then value.to_i | |
| when "boolean" then value == "true" | |
| when "array", "hash" then JSON.parse(value) | |
| when "string" then value # Default for string |
OlderNewer