2011-08-09 10:14:03 +00:00
|
|
|
$one = 1
|
|
|
|
|
2011-08-09 09:20:53 +00:00
|
|
|
class NovelController < ApplicationController
|
2011-08-09 10:14:03 +00:00
|
|
|
$two = 2
|
|
|
|
|
2011-08-09 09:20:53 +00:00
|
|
|
def index
|
2011-08-09 10:05:31 +00:00
|
|
|
@title = 'Shattered View: a Novel on Rails'
|
|
|
|
one_plus_one = 1 + 1
|
|
|
|
increment_counter one_plus_one
|
|
|
|
end
|
|
|
|
|
|
|
|
def helper_method
|
|
|
|
@help_message = "I see you've come to me for help."
|
|
|
|
end
|
|
|
|
|
|
|
|
def increment_counter(by)
|
|
|
|
@counter ||= 0
|
|
|
|
@counter += by
|
2011-08-09 09:20:53 +00:00
|
|
|
end
|
|
|
|
|
2011-08-09 10:14:03 +00:00
|
|
|
def sequel
|
|
|
|
$three = 3
|
|
|
|
end
|
|
|
|
|
2011-08-09 09:20:53 +00:00
|
|
|
end
|