Sha256: d590bd2f4e86382b2b59b828a8f467c6514e2cf16f3226abd03216e71e967894

Contents?: true

Size: 264 Bytes

Versions: 27

Compression:

Stored size: 264 Bytes

Contents

module TemplateHelper
  def render_or_default(partial, default = partial)
    render :partial => partial
  rescue ActionView::MissingTemplate
    begin
      render :partial => "layouts/#{default}"
    rescue ActionView::MissingTemplate
      nil
    end
  end
end

Version data entries

27 entries across 9 versions & 1 rubygems

Version Path
install_theme-0.8.2 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.8.2 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.8.2 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.8.1 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.8.1 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.8.1 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.8.0 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.8.0 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.8.0 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.7.2 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.7.2 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.7.2 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.7.1 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.7.1 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.7.1 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.7.0 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.7.0 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb
install_theme-0.7.0 spec/expected/rails/bloganje/app/helpers/template_helper.rb
install_theme-0.6.2 lib/install_theme/templates/app/helpers/template_helper.rb
install_theme-0.6.2 spec/expected/rails/the-hobbit-website-template/app/helpers/template_helper.rb