-
Picture/File Archive on the admin site
-
Ability to upload files + file archive
-
Opportunity for bold, italic and underlined on news titles - An inline editor like tinyMCE (daniel)
-
Same system on program pages as the news page - image, text and read more when you reach over 120 + characters merge with text 2, where we could write a minimum of 3 lines. + Link under each performance: Info on ticket sales
-
More events at. day on the calendar - possibly.
-
Link by each event in the calendar - in admin module where you can choose for a page on the site, which should be linked on to
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
validate :is_valid_time | |
def valid_time? | |
self.time > 24.hours.from_now | |
end | |
def is_valid_time | |
errors.add("Your object", "is not valid. Other explainations.") unless valid_time? | |
end |
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
# Run me with: | |
# | |
# $ watchr .watchr | |
# -------------------------------------------------- | |
# Convenience Methods | |
# -------------------------------------------------- | |
def growl(result) | |
result_lines = result.split("\n") |
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
<div id="subcontent-wrapper"> | |
<div id="section-wrap"> | |
<div id="sidebar-left" style="float: left; width: 239px; padding: 0px; height: 600px; "> | |
SIDE BAR LEFT BOOOYEAH! | |
</div> | |
<div id="sidebar-right"> | |
BOOO | |
</div> |
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
# Add this to the end of your development.rb and add | |
# | |
# gem 'pry' | |
# | |
# to your Gemfile and run bundle to install. | |
silence_warnings do | |
begin | |
require 'pry' | |
IRB = Pry |
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
#Workflow | |
git co development | |
git pull | |
git co -b todays_work // create new temp working branch | |
...do some work... | |
git commit | |
git co development | |
git pull ----- (remote changes come in) | |
### inspect all changes ### | |
git co todays_work |
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
<!doctype html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<h2>result</h2> | |
<div class="result"></div> | |
<h2>result2</h2> |
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
# | |
# Yahoo Stock find | |
# gem ystock | |
# | |
# by Greg Winn | |
# winn.ws | |
# http://github.com/gregwinn/ystock | |
# | |
require 'cgi' | |
require 'net/http' |
Here's how I hardened the login via resque_auth.rb
. You'll need the bcrypt-ruby
gem installed.
- Fire up IRB or PRY
require 'bcrypt'
- Generate a salt:
salt = BCrypt::Engine.generate_salt
puts salt
// make sure you copy this somewhere.- Now,
salted_hash = BCrypt::Engine.hash_secret("YOUR PASSWORD GOES HERE", salt)
- make sure you save the longer output!
Update resque_auth.rb
as follows - it limits access to the username 'admin' as well!
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 ApplicationHelper | |
def redcloth_sanitize(text) | |
# http://www.jeffroush.com/technotes/2011/01/02/using-textile-in-rails/ | |
sanitize(RedCloth.new(text, [:filter_html, :filter_styles]).to_html) | |
end | |
end |