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 [...]

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.

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 [...]

Creating a sitemap for Rails and Heroku

Most sitemap posts seem to explain the best way of doing things as running a background job that then writes / updates the sitemap.xml file. This is a bit of a problem in a predominantly read-only environment such as heroku. To solve this, we wrote a quick controller action to create the sitemap on the [...]

Installing Ruby on Rails and MultiRuby on Snow Leopard

Below are instructions on how to install a multi-ruby system, Ruby on Rails and everything you need to run a basic Ruby on Rails setup. Running the RVM gem (which we show how to install) allows you to easily run multiple Ruby versions and switch seamlessly between them. First steps: – Checking your Architecture Make [...]

Calculating your Flight Carbon Footprint

We have been pretty busy recently working on carbon calculation tools (using Ruby on Rails). One we have just released is a skinnable flight carbon calculator. This can easily be added to any blog or website. To embed on to your site, go to: Flight Carbon Calculator and choose a theme and comparable. I have [...]

Rubymash now has Ruby on Rails Job listings

Rubymash has been ticking along nicely as a map of freelancers and companies working with rails throughout the world. Traffic has been fairly consistent since the site was first released. However all Rubymash offered was a directory of freelancers and companies on a map. Sticking with the on-a-map idea, we have just released a jobs [...]

Sitemap Generator for Ruby on Rails Applications

Follow these steps if you wish to add a sitemap.xml generator to a rails application. The idea is to generate a sitemap.xml for selected records from the database, in this case they are Articles and Categories. This sitemap is pinged to popular search engines like google, yahoo, bing and ask. Step 1: Add a sitemap.rb [...]