# Scrub sensitive parameters from your log
# filter_parameter_logging :password
+# rescue_from NoMethodError, :with => :no_method_error
+# rescue_from NameError, :with => :no_method_error
+
+ protected
def ucs2char(ucs)
return nil unless ucs =~ CODEPOINT
code = ucs.slice(2, ucs.size)
end
return doc.to_s
end
+
+ private
+ def no_method_error
+ render :text => "不正なアクションです", :status => 404
+ end
end
@wordheads = DxWordhead.find(:all, :conditions => ["radical_id = ?", radical_id])
end
def word
+ redirect_to(:controller => 'hanmorph', :action => 'index')
+
+ # no action
c = params[:char]
return nil unless c
(@ucs, @char) = process_char(c)
end
def rhyme
rhyme_id = params[:id]
+ if request.post? and !rhyme_id then
+ redirect_to(:controller => 'hanmorph', :action => 'index')
+ end
@rhyme = Rhyme.find(:first, :conditions => ["id = ?", rhyme_id])
@volume = Volume.find(:first, :conditions => ["id = ?", @rhyme.volume_id])
@voices = Voice.find(:all, :conditions => ["rhyme_id = ?", rhyme_id])
end
+
# TODO: piece -> leaf
def show
@vol = params[:vol]
@wordheads =
Wordhead.find(:all, :conditions => ["voice_id = ?", @voice.id])
end
+ protected
def setup
@wordheads = 0
@voices = 0
</p>
<div style="float: right; padding: 0px 20px">
<%= image_tag("swjz-v02-trans.jpg", :size => "300x170") %>
+ <!-- %= image_tag("shuowenjiezi-part.jpg", :size => "300x170") % -->
</div>
<p>
本システムは「HOME」頁を中心に構成されていて、