Skip to content

Instantly share code, notes, and snippets.

Routing Error
No route matches {:action=>"show", :controller=>"news"}
console:
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"ne
ws"}):
57: %li
resources :news
resources :events
resources :boards
resources :partners
resources :places
resources :images
resources :galleries
resources :users
resources :sessions
#calendar
%h2#month
= #debug get_date
= link_to "<", :month => (date.beginning_of_month-1).strftime("%Y-%m")
=h date.strftime("%B %Y")
= link_to ">", :month => (date.beginning_of_month+1).strftime("%Y-%m")
= debug Event.all
= debug @events
= debug events
class ApplicationController < ActionController::Base
protect_from_forgery
force_ssl
@events = Event.all
private
def signed_in_user
if current_user.nil?
#calendar
%h2#month
= #debug get_date
= link_to "<", :month => (date.beginning_of_month-1).strftime("%Y-%m")
=h date.strftime("%B %Y")
= link_to ">", :month => (date.beginning_of_month+1).strftime("%Y-%m")
- events = Event.all
= debug events
<div id="calendar">
<h2 id="month">
<%= link_to "<", :month => (@date.beginning_of_month-1).strftime("%Y-%m") %>
<%=h @date.strftime("%B %Y") %>
<%= link_to ">", :month => (@date.end_of_month+1).strftime("%Y-%m") %>
</h2>
<% calendar_for @articles, :year => @date.year, :month => @date.month do |calendar| %>
<%= calendar.head('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday') %>
<% calendar.day(:day_method => :published_on) do |date, articles| %>
<%= date.day %>
tbody tr:nth-child(even) td, tbody tr.even td {background:none !important;}
a {
color: #000 !important;
text-decoration: none !important;
background: none !important;
}
.menu a, .menu a:visited, .menu a:active {
color: #000 !important;
text-decoration: none !important;
<%= calendar_for(2009, 1) do |day|
if Calendar.has_events_on?(day)
[link_to(day.day, events_path(day.year, day.month, day.day)), { :class => "dayWithEvents" }]
else
day.day
end
end %>
commit 4fcf8c26945362d88402cdb9545d382e75022f27
Merge: 1966a99 eec5c0a
Author: Daniel <[email protected]>
Date: Tue Jul 5 11:55:06 2011 -0700
Merge pull request #4 from bsodmike/development
CSS Updates for layout.
commit eec5c0aaf3405e4919b48a2f0fb314a3f04e9aa7
* 4fcf8c2 Merge pull request #4 from bsodmike/development
|\
| * eec5c0a updated css for freely moving container
* | 1966a99 Merge pull request #3 from bsodmike/development
|\ \
| |/
| * a02c525 undo unnecessary migration for start field; added virtual attribute
| * 888c464 completed skinning of calendar
|/
* dc7651f figured out HAML link_to issue with carrierwave; .kill templates are l