I really don’t know why this doesn’t work. It seems so simple.
The current user just wont update it’s :active_lesson_page attribute when calling update_active_lesson_page(lesson_page) on the current_user.
Lesson Controller
current_user.update_active_lesson_page(lesson_page)
User model
def update_active_lesson_page(lesson_page)
active_lesson_page = lesson_page.id
save
end
Thanks for helping out!
How you realize that it should works?
here you define local variable
then you save model with no changes
Try one of this:
or