Now there is the problem that if there is found an ID column (such as foreign keys) it is displayed in the view so that I can manipulate it from the view. In the default Rails scaffold this doesn't happen, because the static form created by it doesn't include any ID related fields (I don't know though how it checks for them).

How can I prevent this from happening?

I have to check the string coming from the database if it ends with '_id' or simply is called 'id'. The latter should be easy, the former I don't know how to accomplish.