R
R
ruby_nub2017-02-18 07:56:05
CRM
ruby_nub, 2017-02-18 07:56:05

rails. How to make triggers in CRM?

You can do tasks in the CRM.
How to make a new task to be created after the execution of a task.
I know about before_action but don't know how to design it.
I will be glad to any ideas.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Nesterovich, 2017-02-23
@vanderv

after_update :create_new_task, if: :completed?
def create_new_task
  self.class.create(title: 'Your new task', user_id: user_id)
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question