Class: Write::PostsController
Instance Method Summary
collapse
#login_user, #timestamp_display, #write_admin?
Instance Method Details
#fetch ⇒ Object
21
22
23
|
# File 'app/controllers/write/posts_controller.rb', line 21
def fetch
GG.fetch if GG.empty?
end
|
#index ⇒ Object
8
9
10
|
# File 'app/controllers/write/posts_controller.rb', line 8
def index
@posts = GG.all
end
|
#refresh ⇒ Object
14
15
16
17
18
19
20
|
# File 'app/controllers/write/posts_controller.rb', line 14
def refresh
if write_admin?
GG.clear!
GG.fetch
end
redirect_to :action => :index
end
|
#show ⇒ Object
11
12
13
|
# File 'app/controllers/write/posts_controller.rb', line 11
def show
@post = GG.find params[:year], params[:code]
end
|