Skip to content

Instantly share code, notes, and snippets.

View doombongo's full-sized avatar

Michael Lussier doombongo

  • GitLab
  • Fayetteville, Arkansas
View GitHub Profile
<%= link_to "Get involved", involves_path, class: "#{cp(involves_path,new_volunteer_path)} link"
module ApplicationHelper
def cp(*path)
"current" if current_page?(path)
end
end
@doombongo
doombongo / application.html.erb
Created November 30, 2012 07:52
Multiple paths for a current_page?(path) helper
<li> <%= link_to "Get involved", involves_path, class: "#{cp(involves_path, new_volunteer_path)} link" %></li>
@doombongo
doombongo / application.html.erb
Created November 30, 2012 07:52
Multiple paths for a current_page?(path) helper
<li> <%= link_to "Get involved", involves_path, class: "#{cp(involves_path, new_volunteer_path)} link" %></li>
ArgumentError
missing :controller
Rails.root: /Users/Mike/rails_projects/digsite
Application Trace | Framework Trace | Full Trace
config/routes.rb:6:in `block in <top (required)>'
config/routes.rb:1:in `<top (required)>'
This error occurred while loading the following files:
/Users/Mike/rails_projects/digsite/config/routes.rb
Digsite::Application.routes.draw do
resources :line_items
resources :carts
POST "donate/index"
get "about/index"
get "home/index"
resources :teams
resources :volunteers
NoMethodError
undefined method `POST' for #<ActionDispatch::Routing::Mapper:0x00000102b73ec0>
Rails.root: /Users/Mike/rails_projects/digsite
Application Trace | Framework Trace | Full Trace
config/routes.rb:6:in `block in <top (required)>'
config/routes.rb:1:in `<top (required)>'
This error occurred while loading the following files:
/Users/Mike/rails_projects/digsite/config/routes.rb