We know that each developer need some laughter during code. So Gem is only for fun. This Gem provide give a simple method get_mamajoke() which you can use in any view file. And this function return a random joke . Also you can run command on command line to fetch random joke if you are getting bored during development : rails joke:random
Add follow lines in config/application.rb
require "net/http" require "uri"
Add this line to your application's Gemfile:
And then execute:
$ bundle install
Or install it yourself as:
$ gem install mamajoke
After installation just call get_mamajoke() function in your view and enjoy coding.
<span class="alert alert-success"> <%= get_mamajoke() %> </span>
Also you can run command on command line to fetch random joke if you are getting bored during development:
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mamajoke. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Mamajoke project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.