Class: Johnhenry::HomeController

Inherits:
ApplicationController show all
Defined in:
app/controllers/johnhenry/home_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::DEFAULT_DESCRIPTION, ApplicationController::DEFAULT_TITLE

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_ids, #set_meta_tag_defaults

Instance Method Details

#installObject



21
22
23
24
25
# File 'app/controllers/johnhenry/home_controller.rb', line 21

def install
  johnhenry_root = Gem.loaded_specs['johnhenry'].full_gem_path.freeze
  filename = File.join(johnhenry_root, 'README.md')
  @readme = GitHub::Markup.render(filename, File.read(filename))
end

#welcomeObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/johnhenry/home_controller.rb', line 6

def welcome
  title = 'New to Ruby on Rails? Launch a site like this in 10 minutes'
  description = "    In under 10 minutes, watch your first web site go live to the internet!\n    Save weeks of development time by building your next app on top of Rails\n    4 Payment: ready to deploy on Heroku, included common front-end modules\n    already built, accept payments with Stripe, Google Analytics integration\n    and more!\n  EOS\n  if defined?(set_meta)\n    set_meta title: title, description: description,\n             og: { title: title, description: description }\n  end\nend\n".squish