sitepress-rails/rails/app/controllers/concerns/sitepress/site_pages.rb
# Rails 5 requires an extension, like `:html`, to resolve a template. This
# method returns the intersection of the formats Rails supports from Mime::Types
# and the current page's node formats. If nothing intersects, HTML is returned
# as a default.
Rails 5 requires an extension, like `:html`, to resolve a template. This
method returns the intersection of the formats Rails supports from Mime::Types
and the current page's node formats. If nothing intersects, HTML is returned
as a default.
Rails 5 requires an extension like ` : html ` to resolve a template . This method returns the intersection of the formats Rails supports from Mime :: Types and the current page ' s node formats . If nothing intersects HTML is returned as a default .
def current_resource_rails_formats
      extensions = current_resource.node.formats.extensions
      supported_extensions = extensions & Mime::EXTENSION_LOOKUP.keys
      if supported_extensions.empty?
        DEFAULT_PAGE_RAILS_FORMATS
      else
        supported_extensions.map?(&:to_sym)
      end
    end
def current_resource_rails_formats extensions = current_resource . node . formats . extensions supported_extensions = extensions & Mime :: EXTENSION_LOOKUP . keys if supported_extensions . empty? DEFAULT_PAGE_RAILS_FORMATS else supported_extensions . map? ( & :to_sym ) end end
Rails 5 requires an extension, like `:html`, to resolve a template.
Rails 5 requires an extension like ` : html ` to resolve a template .