Sha256: ddcd5e9b857aa646b479dd87c40857c8f52a3fb7eb1c554cd5fe7c6dd4979e45

Contents?: true

Size: 436 Bytes

Versions: 11

Compression:

Stored size: 436 Bytes

Contents

require_dependency "social_networking/application_controller"

module SocialNetworking
  # Sends back static templates.
  class TemplatesController < ApplicationController
    # Renders either the engine template if it exists or the host template.
    def page
      @path = params[:path].gsub(/[^_a-z\/]+/m, "")
      template = "social_networking/templates/#{ @path }.html"

      render file: template, layout: nil
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
social_networking-0.11.8 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.7 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.6 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.5 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.4 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.3 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.2 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.1 app/controllers/social_networking/templates_controller.rb
social_networking-0.11.0 app/controllers/social_networking/templates_controller.rb
social_networking-0.10.0 app/controllers/social_networking/templates_controller.rb
social_networking-0.9.3 app/controllers/social_networking/templates_controller.rb