This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Check version, needs to be: 1.0.1-4ubuntu5.12 | |
apt-cache policy openssl | |
#Backup source list | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup | |
# Change your mirrors, Rackspace is out of date | |
sudo sed -i 's/mirror.rackspace.com/us.archive.ubuntu.com/g' /etc/apt/sources.list | |
#Update your packages | |
sudo apt-get update | |
#Install the latest version | |
sudo apt-get install openssl=1.0.1-4ubuntu5.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% Rails.application.routes.routes.map do |route| %> | |
<% | |
path = route.path.spec.to_s | |
next if path.starts_with? '/admin' | |
controller = route.defaults[:controller].to_s | |
action = route.defaults[:action].to_s | |
is_permitted = permitted_to? action.to_sym, controller.sub(/\//, '_').to_sym | |
%> | |
<tr><%#<td><%= route.name </td>%> | |
<td><%= path %></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TableHelper | |
def table_for(objects, *args) | |
raise ArgumentError, "Missing block" unless block_given? | |
options = args.last.is_a?(Hash) ? args.pop : {} | |
html_options = options[:html] | |
builder = options[:builder] || TableBuilder | |
content_tag(:table, html_options) do | |
yield builder.new(objects || [], self, options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CalendarHelper | |
# Generates a calendar (as a table) for an array of objects placing each of them on the corresponding date. | |
# | |
# **TODO: fully document this method, the current documentation is far from done.** | |
# | |
# @param [Hash] options extra options | |
# | |
# :row_header if true, each row will have an extra cell at the beginning, as a row header. A typical usage would be | |
# to output week numbers. When the block is called, it will get the date that would normally be passed to the | |
# first day of the week (to give you some context) and a nil list of objects (and that's how you recognize it as |