Class: TDiary::TDiaryForm

Inherits:
TDiaryAdmin show all
Defined in:
lib/tdiary/admin.rb

Overview

class TDiaryForm

show diary append form

Constant Summary

Constants inherited from TDiaryBase

TDiary::TDiaryBase::DIRTY_COMMENT, TDiary::TDiaryBase::DIRTY_DIARY, TDiary::TDiaryBase::DIRTY_NONE, TDiary::TDiaryBase::DIRTY_REFERER

Instance Attribute Summary

Attributes inherited from TDiaryBase

#cgi, #conf, #cookies, #date, #diaries, #ignore_parser_cache, #rhtml

Instance Method Summary collapse

Methods inherited from TDiaryBase

#[], #calendar, #eval_rhtml, #last_modified

Methods included from ViewHelper

#base_url, #bot?

Constructor Details

#initialize(cgi, rhtml, conf) ⇒ TDiaryForm

Returns a new instance of TDiaryForm.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/tdiary/admin.rb', line 25

def initialize( cgi, rhtml, conf )
	begin
		super
	rescue TDiaryError
	end

	@date = Time::now + (@conf.hour_offset * 3600).to_i
	title = ''
	@io.transaction( @date ) do |diaries|
		@diaries = diaries
		diary = self[@date]
		title = diary.title if diary
		DIRTY_NONE
	end
	@diary = @io.diary_factory( @date, title, '', @conf.style )
end

Instance Method Details

#csrf_protection_get_is_okayObject



23
# File 'lib/tdiary/admin.rb', line 23

def csrf_protection_get_is_okay; true; end