Mongoid Embedded Documents embeds_many form example using simple_form

Below is an example of how to produce a form for an embeds_many association for mongoid and simple_form (although this will also work with the standard rails helpers). Class User include Mongoid::Document embeds_many :children, :class_name => "Child" accepts_nested_attributes_for :children, reject_if: proc { |attributes| attributes["age"].blank? } end Class Children include Mongoid::Document field :age, type: String embedded_in [...]

Chromaroma goes from Beta to Live

We are proud to announce the full launch of Chromaroma. Here at Dynamic50 we have been working with Mudlark on the development of Chromaroma for quite some time now. Dynamic50 took over the development work in September 2010 and several members of our team here have had the opportunity to work on it. Development was [...]

Ruby Gem for the Police API

Richard from Dynamic50 has just released a ruby gem for the Police API available here: https://github.com/hookercookerman/oldbill. It allows you to hook into the new Police API service to find out about crime in your local area. To get started, simply register for an API key here: http://policeapi2.rkh.co.uk/api/docs/signup/ and then add the gem to your Gemfile: [...]

Ruby on Rails Training weekends

****AMENDED TIMES********************* The date of this course has been moved to 16th – 17th April, details and booking is available at http://rubyonrailstraining.eventbrite.com/ ****************************************** Following on from our last post and the feedback we received, we have decided to move the Rails training course to run over a weekend rather than during the week. We have [...]

Ruby on Rails Training Course

We are holding a ruby on rails kick start training course here at Dynamic50. If you want to go from zero to hero in a short amount of time See what you will learn.

Redirect all requests for www. to root domain with Heroku

Following on from my post the other day regarding Heroku wildcards I thought it would be worth looking at redirecting either www to root or vice-versa. Heroku doesn’t give you the ability to touch the VHost settings, which is where this sort of thing is usually done, but this is not a problem as you [...]

Validations On The Fly

When I was creating the CarbonCalculated API (Carbon Calculation Platform) I needed to give an instance of a model its’ own validations; so in a nut shell each instance can have a completely different set of validations compared to the next one; so the question is: how do we store validations and make sure the [...]

SSL on wildcard domains on Heroku using GoDaddy

We have just finished setting up ssl on wildcard domains for a client. We have set this up on Heroku so that you have ssl on all top level subdomains. For example: *.myapp.com demo.myapp.com hello.myapp.com secure.myapp.com This is a fairly straightforward process, however there appears to be no good documentation online on how to do [...]

Chromaroma – Gaming on London Transport

Chromaroma is a game played using your Oyster card whilst travelling around London. It connects communities of people who cross paths and routes on a regular basis, and encourages people to make new journeys and use public transport in a different way by exploring new areas and potentially using different modes of public transport. Dynamic50 [...]

Installing Rails on a fresh Linode Ubuntu Install

We have been playing around with Linode recently and have been moving most of our sites that are hosted on VPS across to Linode. So I thought I would write a quick getting started tutorial on how to install a rails stack on Linode. Login as root, and add a new user (deploy) ssh root@my_linode_ip [...]