A
A
Anton Ivanov2016-03-31 22:32:47
Ruby on Rails
Anton Ivanov, 2016-03-31 22:32:47

What solutions are used to uniqueize Javascript functions in a rails project?

Hello.
Question for general development.
Let's say we have a rails application with a large number of controllers. Each controller has its own .js/.coffee file. When compiling statics, all these files are merged into one. What technique is commonly used to ensure the uniqueness of the names of functions / variables in js?
At the moment I'm naming them using the controller name as a prefix. That is, for example, projectsUpdate(), clientsUpdate() and so on. But maybe there are some more correct / generally accepted solutions?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2016-04-01
@Fly3110

There is such a technique - "think with your head." This is where it should be applied.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question