Added a forget rule for dispatching views.
for example: /users/johndoe should have looked in order to 1 - JohndoeUserHTMLView 2 - UserHTMLView 3 - HTMLView the 2 wasn't done before.
This commit is contained in:
parent
1382924252
commit
8d814cdb8f
1 changed files with 10 additions and 0 deletions
|
@ -43,6 +43,16 @@ module Rubyzome
|
|||
puts %{selected view = #{view_name}}
|
||||
return
|
||||
end
|
||||
# check Ressource Type Specific View
|
||||
# eg: /stats.xml will render using
|
||||
# app/views/xml/StatXMLView
|
||||
view_name=%{/#{type.downcase}/#{model}#{type.upcase}View}
|
||||
puts %{try view = #{view_name}}
|
||||
if $views.has_key?(view_name)
|
||||
@view=$views[view_name].new
|
||||
puts %{selected view = #{view_name}}
|
||||
return
|
||||
end
|
||||
else
|
||||
# check Plural Ressource Specific View
|
||||
# eg: /stats.xml will render using
|
||||
|
|
Loading…
Reference in a new issue