Changing rails3 plugin to rails