Closed halfghaninne closed 8 years ago
If I'm understanding you correctly... Could you try an after_initialize
callback in the Salary
model?
Just saw this, sorry.
I think it will be too late. Upon initialization, the Salary
's amount
gets truncated to 30
.
I suppose I could do some work like...
after_initialize :do_the_thing
def do_the_thing
# if rate == 0 amount should be multiplied by 1000, probably
# continue to make other assumptions based on rate of the Salary object
# which I don't like and was trying to avoid for some reason
end
If that is the approach I take, I don't see much difference between using an after_initialize
and before_save
callback.
Fixes #123
Login Credentials
Your GH profile. You should be able to create a new Job Application (that might mean being a "student" User)
Functionality to Test
50,000
or50000
or$50000
and the application can respond accordingly, saving the Salaryamount
as50000
, an int."earning $50,000 (yearly)"
)