rails g and small changes

Signed-off-by: Zeljko <zeljko@zwr.fi>