There be a website
This commit is contained in:
parent
64fb080e96
commit
af0907c7c3
65 changed files with 708 additions and 14 deletions
9
app/controllers/home_controller.rb
Normal file
9
app/controllers/home_controller.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class HomeController < ApplicationController
|
||||
def years_between_dates(date_from, date_to)
|
||||
return (date_to - date_from).to_i / 365
|
||||
end
|
||||
|
||||
def index
|
||||
@age = years_between_dates(DateTime.civil_from_format(:local, 2005, 6, 7), DateTime.now)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue