3 ms·
> You modify the new and update method adding the line: > @recipe.date = Time.now > The equivalent in OX is adding the @DefaultValueCalculator annotation in mod
by DjDarkman 16y ago
> You modify the new and update method adding the line:
> @recipe.date = Time.now
> The equivalent in OX is adding the @DefaultValueCalculator annotation in model:
> @DefaultValueCalculator(CurrentDateCalculator.class)
> private Date date;
> You obtain the same effect in a more declarative way.
That is more like a more verbose way. I am not a Ruby guy, but I would prefer the first syntax.
- foljs 16y agoMore verbose? Both are only one line statements. The only way it's more "verbose" is because the class name is bigger. You can use a one letter classname, if that's your problem.