Skip to content

Introducing is_column_state? Functions #21

@h4cc

Description

@h4cc

It would be cool, to have a praedicate to check if a column is in a state, like: is_update_successfull?

Code to use here:

      states
      |> Enum.each(fn(state) ->
        def unquote(:"is_#{column}_#{state}?")(model) do
          :"#{Map.get(model, unquote(column))}" == unquote(state)
        end
      end)

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