Lessons learned: migrating Ruby on Rails app to a private server

I needed to migrate a ruby on rails app from amazon web services to a privately owned hosting service. AWS has it's own method of building and provisioning rails app (basically by using their in house tool called "beanstalk"), so provisioning and migrating the data to a normal, private server meant I took some quick notes … Continue reading Lessons learned: migrating Ruby on Rails app to a private server

Advertisements

Rails : of select_tags and options_from_collection_for_select

A bit difficult to get this information... Rails' helper when building select elements for a form is the well-known select_tag. If you are populating the options within a select form with data from your database through a model, you would use the options_from_collection_for_select helper. An example  is in fact quite straightforward: options_from_collection_for_select(@extensions, 'ext', 'name') Meaning if your … Continue reading Rails : of select_tags and options_from_collection_for_select

Nugget Post : Excellent article re web security

Even though the article focuses on ruby, it is an excellent all round security article that highlights web application vulnerabilities and countermeasures. All in all, every developer and pentester should read, regardless of the language they develop in: http://guides.rubyonrails.org/security.html

Newbie Post: Rendering javascript views in Rails

I've found the Rails method of "remote => 'true'" to be extremely useful. In most of my website designs, a user action (such as clicking a button), will generate a modal and prompt the user for further action. In both HTML frameworks I've used (bootstrap and foundation), the modals are triggered by javascript. This fits … Continue reading Newbie Post: Rendering javascript views in Rails

Connecting Ruby on Rails to multiple databases

It's not dicussed very often, but it is possible to connect a Ruby on Rails app to multiple backend databases. This, paired with the importation of a pre-existing data as outlined in a previous blog post,  is useful in scenarios where your application is required to read data from a shared databases populated by another … Continue reading Connecting Ruby on Rails to multiple databases

Migrating a PHP application to Ruby on Rails

Being primarily a PHP / Python developer, I decided to tackle something new and take on ruby on rails. It's been quite a whirlwind, and one of my exersizes was to attempt to migrate a pre-existing PHP application, that already has its database defined, some HTML and so on... to a rails application. This article … Continue reading Migrating a PHP application to Ruby on Rails