Skip to content

Instantly share code, notes, and snippets.

View jordanell's full-sized avatar

Jordan Ell jordanell

View GitHub Profile
@mynameispj
mynameispj / application_helper.rb
Created June 2, 2013 00:24
Rails - Easy "active" classes for menu links in Rails
module ApplicationHelper
def current_class?(test_path)
return 'active' if request.path == test_path
''
end
end
@adrienpoly
adrienpoly / application.html.erb
Last active March 22, 2024 08:14
Capybara / Stimulus test helper to ensure JS is ready when test starts
<!DOCTYPE html>
<html>
<head>
...
</head>
<body data-controller="js">
<%= yield %>
</body>
</html>