Rubyfy for Rails
Rubyfy brings some of the Ruby methods you miss in JavaScript to your Rails app.
Installation
Add Rubyfy to your gemfile:
gem 'rubyfy-rails'
Inside of your application.js
file add the line:
And wham-bam you can now call [1, 2, 3].last()
in your JS code and get 3
returned to you!
Why?
The rubyfy-rails
gem makes it easy to add Rubyfy to your Rails app. If you're like me, you might miss some of the Ruby methods you love when coding in JavaScript.
Configuration + Methods
Check out config options and a full list of available methods in the Rubyfy README.
License
MIT - Free and open for all. Plz contribue!