Redline Software Inc. - Winnipeg's Leader in Ruby on Rails Development

New Release: Snap Chop Mobile App

Redline Software has released its premier mobile app for iPhone & Android. It’s stupid, smart, awesome, immature, and hilarious all in one.

We develop a lot of business related software, so we found it time to do something a bit less serious with the release of Snap Chop. Check it out at http://www.snapchop.me.

Snap Chop is available for your iPhone/iPad or Android device.

Ruby Syntax Tip

I’ve had quite a few moments while using Ruby when I decide to try to write something that I think should be valid Ruby without knowing if it actually is and it ends up working.

Here’s one of my latest finds using for loops…

1
2
3
  for a, b, c in [[1,2,3], [4,5,6], [7,8,9]]
    puts "#{a}, #{b}, #{c}"
  end

Results in…

1
2
3
  1, 2, 3
  4, 5, 6
  7, 8, 9

The for loop lets you can assign multiple values at the same time which is exactly what you can do with arrays with basic assignment elsewhere in Ruby code.

1
  a, b, c = [1, 2, 3]

I knew I could assign multiple values from an array like this, but had never tried it in a for loop before. Ruby ftw!

Url Menu Items

We’ve added a small new feature to Redzone. You can now create menu items that link to external pages just by specifying a url for the menu item.

Enjoy.

New Email Function

We’ve added a new email function to Redzone. You can now email all players for a given season. The link is accessible from the users and divisions pages.

Redzone Forum Issues

Apologies if anybody has had issues posting to our Redzone Forum, but I think we’ve resolved any outstanding issues with it.

Thanks

Redzone Leagues Migration and Updates

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

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…

1
2
3
#navigation_bar {
  background-image: url(/images/background-nav.png);
}

After…

1
2
3
#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

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

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

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.

1
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.

1
  min_messages: ERROR