Permalink

Migrate a Ruby on Rails App to Rails 4.x with “Strong Parameters”

Ruby Logo

A helpful rake task

I’m just updating a three year old rails app from 3.2 to 4.2. One of the changes is that now the controller is responsible to protect against mass assignments.
I think this is the right architecture, as the controller has the job to receive the input parameters and transfer them to the right model, or reject the request altogether. The browser of the user does not talk directly with the model, and the model does not know which user with which rights has done a request.

With the strong parameters, all allowed parameters need to be in a white list. My app has 60 controllers, so writing all the code for the strong parameters is a big task. For each controller you need to collect the right attributes and put them in the permit-call. Continue Reading →

Permalink

Huawei, Kelsterbach, Rüsselsheim und Raunheim

Notes about „smart city“

The Mayors of three German cities signed a cooperation with Huawei at the CeBIT Fair. I was an observer of the signing ceremony.

Majors signing the agreement. A big display show the text: Smart City Cooperation 3Wins - Huawei LOI Signing

Rüsselsheim Mayor Patrick Burghardt, Raunheims Mayor Thomas Jühe, and Kelsterbachs Mayor Manfred sign a cooperation agreement with Pablo Cui from Huawei.

The cities are located near the biggest German airport of Frankfurt in the economically active Rhein-Main region. However, the cities have combined less inhabitants than Huawei has employees.

What is the agreement about? The cities wish to receive Smart City services, and Huawei plans to open a Smart City Exhibition Center.

What are these smart services exactly? The speech of the mayors were quite generic. If you read the press release, you find only one specific project: the construction of a high speed fibre-optical network.

The cities probably have more projects in mind, as they have organized a German-Chinese Smart City forum in Rüsselsheim in September 2014.

Huawei itself defines the key aspects of Smart City on its website as follows:

In a nutshell, a Smart City describes the integrated management of information that creates value by applying advanced technologies to search, access, transfer, and process information

If I simplify this sentence, Smart City is information management. Like a database.

Huawei further lists the following application areas (in this order):

  • Government and administration (e-government)
  • Traffic management (e-traffic)
  • CCTV (Video surveillance)
  • Health and education (e-health and e-education)
  • Home Monitoring (e-Home)

Next these technical requirements are listed:

A Smart City needs to support services like E1, E3, DS3, STM-1, PRI, ATM, FR and X.25

Overall, Huawei offers a very technical interpretation of the concept Smart City. This is of course not so surprising, as they want to sell the needed technologies. Compare this to other interpretations in my article “Smart City, one term, many concepts

Seite 1 von 612345...Letzte »