Skip to content

Commit

Permalink
Merge pull request rails#49986 from seanpdoyle/action-view-bug-report…
Browse files Browse the repository at this point in the history
…-templates

Add `actionview` bug report template
  • Loading branch information
byroot authored Dec 16, 2023
2 parents 860ab28 + fe2632f commit 32afa64
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions guides/bug_report_templates/action_view.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

require "bundler/inline"

gemfile(true) do
source "https://rubygems.org"

git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem "rails"
# If you want to test against edge Rails replace the previous line with this:
# gem "rails", github: "rails/rails", branch: "main"
end

require "minitest/autorun"
require "action_view"

class BugTest < ActionView::TestCase
helper do
def upcase(value)
value.upcase
end
end

def test_stuff
render inline: <<~ERB, locals: { key: "value" }
<p><%= upcase(key) %></p>
ERB

element = rendered.html.at("p")

assert_equal element.text, "VALUE"
end
end
1 change: 1 addition & 0 deletions guides/source/contributing_to_ruby_on_rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Having a way to reproduce your issue will help people confirm, investigate, and
* Template for Active Record (models, database) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record.rb)
* Template for testing Active Record (migration) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record_migrations.rb)
* Template for Action Pack (controllers, routing) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_controller.rb)
* Template for Action View (views, helpers) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_view.rb)
* Template for Active Job issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_job.rb)
* Template for Active Storage issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_storage.rb)
* Template for Action Mailer issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_mailer.rb)
Expand Down

0 comments on commit 32afa64

Please sign in to comment.