Rails-alike data attribute assignment