Sha256: 71d0d1844f31cfc7d70114ffeb647062293bd35cec9daa61605a9199a1f02d17
Contents?: true
Size: 705 Bytes
Versions: 27
Compression:
Stored size: 705 Bytes
Contents
# A concern that can be included into an `ApplicationController` that displays # static relative-linked pages. module OodAppkit::WikiPage extend ActiveSupport::Concern # 'included do' causes the included code to be evaluated in the context where # it is included (wiki_controller.rb), rather than being executed in the # module's context (wiki_page.rb). included do # prepend_view_path "docs" end # GET /wiki/Home # GET /wiki/uploads/project.zip def show @page = Rails.root.join(params['content_path']).join("#{params['page']}") respond_to do |format| format.html format.all { send_file "#{@page}.#{params[:format]}", disposition: 'inline' } end end end
Version data entries
27 entries across 27 versions & 1 rubygems