Class ActionView::PathSet
In: lib/facebooker/rails/extensions/action_view.rb
Parent: Object

Methods

Public Instance methods

Try to find fbml version if the format is fbjs

[Source]

# File lib/facebooker/rails/extensions/action_view.rb, line 4
  def find_template_with_facebooker(original_template_path, format = nil, html_fallback = true)
    find_template_without_facebooker(original_template_path, format, html_fallback)
  rescue ActionView::MissingTemplate
    template_path = original_template_path.sub(/^\//, '')

    each do |load_path|
     if format == :fbjs && html_fallback && template = load_path["#{template_path}.#{I18n.locale}.fbml"]
        return template
      elsif format == :fbjs && html_fallback && template = load_path["#{template_path}.fbml"]
        return template
      end

      raise MissingTemplate.new(self, original_template_path, format)
    end
  end

[Validate]