Skip to content

Instantly share code, notes, and snippets.

@pragmaticivan
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pragmaticivan/0ba6d0a0e2f59d58ce89 to your computer and use it in GitHub Desktop.
Save pragmaticivan/0ba6d0a0e2f59d58ce89 to your computer and use it in GitHub Desktop.
class MainController < ApplicationController
def index
@verse = Verse.order("RANDOM()").limit(1).first
@book = Book.find(@verse.book_id).name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment