Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #application_controller.rb
- class ApplicationController < ActionController::Base
- include Clearance::Controller
- # Prevent CSRF attacks by raising an exception.
- # For APIs, you may want to use :null_session instead.
- protect_from_forgery with: :exception
- # def url_after_denied_access_when_signed_out
- # '/'
- #end
- #CALENDAR STUFF
- #attr_accessible :name, :start_time
- def start_time
- event_start_time
- end
- def calendar
- @events = Event.all
- end
- end
- #calendar.html.erb
- <div class="page-header"><h1>Calendar</h1></div>
- <%= calendar @events do |event| %>
- <div><%= link_to event.title, event %></div>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement