Project

quoter

0.01
No release in over 3 years
Low commit activity in last 3 years
random quotes for your rails application. dose of wisdom for your app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 4.2.4
 Project Readme

Quoter

Install the gem by adding the following line to your Gemfile.

gem 'quoter'

Then all you have to do is add the following line on the page you want the quotes to appear.

<%= quote_something %> or for inline <%= quote_something(template: :inline) %>

It will return a random quote in the following HTML markup.

<div class="quoter">
	<div class="quote">
		If you’re offered a seat on a rocket ship, don’t ask what seat! Just get on.
	</div>
	<div class="quotee">
		Sheryl Sandberg
	</div>
</div>

That's it. Everytime the page reloads a random quote will appear.

I personally recommend adding the code to a partial so that the quote only loads the one time you open the page and not reload on a fetch. But, I guess you already knew that

Special thanks to signed0's gist from where I took the 102 quotes you'll find the quotesDB module.

If you'd like to contribute the next thing on my list is to use the Wikiquote API to serve quotes about any topic. Start with that.