Sha256: c779aa8de1dc6bc363792a3984adcad61e29033652456a7f670608cb67f01fd3

Contents?: true

Size: 466 Bytes

Versions: 5

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true
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(%r{[^_a-z\/]+}m, "")
      template = "social_networking/templates/#{@path}.html"

      render file: template, layout: nil
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
social_networking-0.13.3 app/controllers/social_networking/templates_controller.rb
social_networking-0.13.2 app/controllers/social_networking/templates_controller.rb
social_networking-0.13.1 app/controllers/social_networking/templates_controller.rb
social_networking-0.13.0 app/controllers/social_networking/templates_controller.rb
social_networking-0.12.0 app/controllers/social_networking/templates_controller.rb