How to put javascript code for rails view to assets/javascript folder?

I have added code to my investment_time_machine.html.erb file. The code is:

    Recent Articles

    What You Want To Learn?