Skip to content

Conditionals: allow string comparism #165

@ChrisKaun

Description

@ChrisKaun

We have a unique usecase for one of our customers who would like to display a string property dependent on it's value in different font-colors. This would require us to do something like this:

«car.color:if(val == 'green')»
  «=car.color» but marked in green
«car.color:elsif(val == 'red')»
  «=car.color» but marked in red
«car.color:endIf»

Of course it would be possible to create a getter method in rails that checks each color but since this is a really unique use case it wouldn't make any sense to hardcode this into our software logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions