Redzone Leagues Migration and Updates
June 24th, 2010
Redzone gets a new home
We’ve recently migrated Redzone to a new data center to improve reliability and performance. To keep up to date on the service status please follow us on twitter @redzoneleagues. Leagues with custom domain names have been contacted with the DNS changes you will need to make, but if you are having problems please contact us support@redzoneleagues.com.
User Configurable Statistics
We’ve added support for user configurable statistics. This only applies to stats for certain sports, so you may not see this in use for your league at the moment. Some statistic calculations vary depending on league, so now a league should be able to configure one of the configurable stats to their needs. An example of this is goals against average in hockey; this calculation uses the game length in minutes which could vary between leagues. To see the available statistics options for your league, click on “Statistics Management” under your admin dashboard.
Multiple Active Seasons
Redzone previously had a limitation of one active season at anytime. Many of our leagues were trying to host tournaments during their season or had multiple seasons going on at the same time, so we’ve added support for this. You can setup your seasons under the admin dashboard.
Upcoming Updates
We have additional features in the works, so stay tuned for more frequent updates. If you’d like to comment or make requests for upcoming features, please either leave a comment in the blog or post a message in our forums
CSS Asset Tagger Rails Plugin
December 3rd, 2009
We’ve released a new plugin for Rails that adds asset timestamps to assets found in an apps stylesheets.
The plugin is available at http://github.com/redlinesoftware/css_asset_tagger
Simply install the plugin and it will tag any assets in your css files with asset timestamps. More information on asset timestamps can be found at http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html
We wrote a previous article on using asset timestamps with nginx, but similar usage applies to Apache as well for example.
The main purpose for writing this plugin is that stylesheets that use images for various things don’t get tagged with the asset timestamps when they’re written as plain old css files. These images can’t make use of expiration techniques very easily without the timestamps. So to make things work as they do with images in rails views, this plugin will add the same timestamps to assets in css files as they are in rails views.
Before…
#navigation_bar {
background-image: url(/images/background-nav.png);
}
After…
#navigation_bar {
background-image: url(/images/background-nav.png?1234567890);
}
If you’re using yslow and some decent expiration on the server and you don’t like seeing images from your css files being shown in your report card, this plugin should make those all go away and hopefully give you a better grade. :)
Lacrosse Support in Redzone
November 12th, 2009
We’ve added support for Lacrosse to Redzone. If you or somebody you know has a Lacrosse league, sign up and check it out.
Quick update to hockey; we’ve added support for +/- stats as well.
Redzone Updates: Multiple positions and Team statistics
November 6th, 2009
We’ve just deployed some major updates to Redzone’s statistics. These include support for multiple positions as well as team related statistics in addition to the player statistics that were only supported before.
We’ve added new statistics to some of the sports, so you check for those in the “Statistics Management” section of the admin dashboard. If there are statistics that you don’t see, but would like to see added then just send us an email at support@redzoneleagues.com and let us know what additional stats you would like to see.
The game cards haven’t been updated to support the addition of multiple positions yet, but this will be supported in an upcoming release. If your league doesn’t track stats for more than one position then you’ll be fine with the current game cards.
We’ve made some changes to the standings calculations. Points can now be awarded to teams for Overtime losses. This is a common theme in hockey where shootouts occur.
The forums display a users profile picture (avatar) along with their post count.
Other minor changes and fixes have been made as well and we have a few more quick updates coming in the next few weeks; mainly the addition of some new statistics.
Since this is fairly large update, there may be some minor issues that may appear, so if you notice any inconsistencies or issues with any of the statistic values, please let us know and we’ll correct the issues as soon as we can. You can do so by posting a message in our forums or by sending us an email.
Silencing DB messages during tests
June 21st, 2009
When running tests in Rails, sometimes you need to perform various tasks in the database directly which can lead to a lot of unwanted messages in your test output.
If you’re using Postgresql, simply add the following line to your tests/tests_helper.rb file.
ActiveRecord::Base.connection.execute "set client_min_messages to ERROR"
Now you’ll only see messages of ERROR and above in your test output.
Update
Found a better way to do this. In your database.yml file, simply add the following line to your :test section.
min_messages: ERROR
Plugins moved to Github
June 21st, 2009
We finally got around to moving our plugins from our old SVN machine into Github. Although we’ve been using Git for a long time, we were slow on moving our plugins for some reason.
Team Registration Changes
April 4th, 2009
A minor change has been made to Redzone Leagues with regards to the team signup process. When a user registers a team, they will now receive an confirmation email with an activation link that they will need to load in order to complete the registration process.
The reason for this change was to ensure that team representatives have current email addresses entered into the system. League administrators often need to contact team representatives, so we want to make sure those emails are as current as possible. As always, users can update their email address by clicking “My Profile” at the top of the site. If they need to resend a team activation email, they can do so from their “My Teams” page, which is linked at the top of the site after they create a team.
If you are a league administrator adding a new team, you will not need to complete the activation process. This is done to make the team creation by administrators as quick as possible.
Extending Named Scopes
February 14th, 2009
Quick code tip…
I’m using named_scope with a lambda as the 2nd paramater, but I also want to extend the named_scope with some custom methods.
named_scope :for_league, lambda{|league_id| {league conditions} } do
def default
end
def do_something_custom
end
end
I use the same extended methods in more than one place, so I figured I’d use something similar to the :extend option used with association methods like has_many, but I can’t pass an :extend option if I’m also using a lambda.
The way around this is to just include the methods directly in the block.
module Associations
def default
end
def do_something_custom
end
end
named_scope :for_league, lambda{|league_id| {league conditions} } do
include Associations
end
Works like a charm. Now I can just reuse the Associations module where I need it.
Nginx expiry for Ruby on Rails
January 25th, 2009
Setting the expiry header is a pretty easy way to optimize page loads. Rails helps with this by adding a 10 digit query string that represents the last modified time of the file to assets such as images, stylesheets and javascript files .
Some details on the asset timestamp (the query string of the url) can be viewed in the rails api docs in the Using asset timestamps section.
An example of the paths generated in your views look like this…
/stylesheets/styles.css?1234567890
So if you’re using Nginx, how do we configure things to properly set the expires header?
Read the rest of this entryPlayer data and OT Pts
January 7th, 2009
Two new features have been added to Redzone.
- You can now download your player data from the admin users page. The file can be imported into a spreadsheet and formatted however you see fit.
- A new overtime win point setting has been added along with the other point settings which are available from the admin dashboard.
Follow us on Twitter
December 20th, 2008
For our Redzone Leagues users, you can now follow us on Twitter to receive updates or service status messages.
Redzone Update
December 20th, 2008
Just a quick note to mention some small updates recently made to Redzone…
- Division Stats - You can now view the stats for an entire division. The default it still the top 10 for all divisions, but if you’re looking for an extended list of stats, you now have that option.
- Allow multiple contacts - This is a really minor change, but before you couldn’t add a user more than once on the contact page, but now you can.
- Division email - An additional email option has been added to the teams page. You can now send an email to an entire division if required. (This is only accessible to administrators)
Team Roster Enhancements
October 19th, 2008
It’s been a little while since our last feature update post, but we’ve recently added a couple of new enhancements to the team rosters.
Player number support has now been added. An administrator or team contact can enter in player numbers for their team and these will appear on the team page and will also automatically appear on game score cards.
The second addition is the ability to “disable” a player on a team. An administrator or team captain may want to do this if a player no longer plays on a team or have been “traded” to another team, etc. Disabled players are removed from the team email messages as well as the list of eligible players for a game when entering stats.
Both of these features are only available to the league administrator and the team contact. Simply press the “Edit Roster” button at the bottom of the page for a specific team and you will have the options to specify the player numbers as well as enabling and disabling players using the checkboxes beside each player.
Redzone News & Forum RSS Feeds
August 13th, 2008
We’ve added RSS feeds for news items as well as each forum that you create for your league. There’s also a feed for all of the forums combined. See your browsers docs and/or use your favourite RSS reader to make use of them.
Enjoy!
file_column image regeneration
August 11th, 2008
If you use file_column for some projects and find that you want to change the thumbnail sizes that you’ve been using for models, then hopefully this little bit of code can help.
Add this as a rake task and run it as rake "filecolumn:regenerate[Model, field]" RAILS_ENV=production where Model is the model you want to regenerate images for and field is the filecolumn field on the model. The task uses Rake arguments, so you’ll need Rake 0.8.
namespace :filecolumn do
desc "Regenerate filecolumn images"
task :regenerate, :model, :field, :needs => :environment do |task,args|
if args.any?{|k,v| v.blank?}
puts "Usage: #{task.name}[Model,field]"
else
klass, field = args.model.constantize, args.field
klass.all.each do |obj|
puts "Regenerating #{klass} #{obj.id}"
next if obj.send(field).nil?
state = obj.send("#{field}_state")
state.instance_variable_set(:@just_uploaded, true)
state.transform_with_magick
end
end
end
end
The code essentially boils down to 2 lines…
- setting @just_uploaded to true on the state object
- calling the transform_with_magick method on the state object
