class UzuUzu::Controller::Index

Public Instance Methods

css(id) click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 12
def css(id)
  UzuUzu::repository do
    @resource = Css.first(:id => id)
  end
  if @resource.blank?
    not_found
  end
  response["Content-Type"] = mime_type(:css)
  @resource.body
end
file(id) click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 40
def file(id)
  UzuUzu::repository do
    @resource = File.first(:id => id)
  end
  if @resource.blank?
    not_found
  end
  response["Content-Type"] = mime_type(@resource.content_type)
  @resource.body
end
image(id) click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 54
def image(id)
  UzuUzu::repository do
    @resource = Image.first(:id => id)
  end
  if @resource.blank?
    not_found
  end
  response["Content-Type"] = mime_type(@resource.content_type)
  @resource.body
end
index() click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 7
def index
  redirect(rf(Initialize)) unless info.initialize?
  respond(render_full(Page, :top_page))
end
javascript(id) click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 26
def javascript(id)
  UzuUzu::repository do
    @resource = Javascript.first(:id => id)
  end
  if @resource.blank?
    not_found
  end
  response["Content-Type"] = mime_type(:js)
  @resource.body
end
movie(id) click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 68
def movie(id)
  UzuUzu::repository do
    @resource = Movie.first(:id => id)
  end
  if @resource.blank?
    not_found
  end
  response["Content-Type"] = mime_type(@resource.content_type)
  @resource.body
end
sitemap() click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 79
def sitemap
  respond_to do |wish|
    case(wish)
    when :xml
      "<test>a</test>"
    else
      ""
    end
  end
end
spinup() click to toggle source
# File lib/uzuuzu-cms/controller/index.rb, line 93
def spinup
  'spinup'
end