Category Archives: Ruby
Recently, I created a rake task to load dummy data into a Rails app. I wanted the data to be somewhat random to make it easier to spot design issues depending on data being filled in or left blank. But … Continue reading
Dannon currently has a “promotion” called Cups of Hope where you can enter codes into their web page to donate money to breast cancer research. Entering data repeatedly gets old real fast, so I figured this would be a great … Continue reading
Mechanize works great for uploading data through forms: it has great support for manipulating text fields, check boxes, and so on. Selecting the appropriate option from a dropdown is slightly more roundabout.
In this post, I’ll briefly describe a Mechanize script I wrote to update data in a web application. We’ll see how to navigate using Mechanize, and finding HTML elements with XPath. The goal was simple: open a CSV file containing … Continue reading
In one of my side projects, I needed some setup data to be present in the test database before each Cucumber session. Since this took me a few moments to get right, I figured I’d document it here.
I recently ran into an issue using the permanent records gem: when you permanently destroy a record (i.e. NOT soft delete), the dependent records with a `:dependent => :destroy` relationship are only soft deleted (i.e. marked as deleted, but kept … Continue reading
I needed to combine customer data from 2 separate sources (a homebrew warehouse and CRM) and output a report. Given I’d be dealing with similar objects with overlapping attributes, it would be really easy to make a gigantic mess with … Continue reading
I wanted to add a generator to the SugarCRM ruby gem, but couldn’t find any straightforward resources on doing just that: taking a standalone ruby gem, and adding a generator that is available from within a Rails environment. To make matters … Continue reading
This is an article about “advanced” use of the SugarCRM Ruby gem. We’ve previously covered using basic gem functionality, and building a simple rails app using the gem to make a CRM portal, so you might want to take a … Continue reading