rails admin view code refactor

Changed for rails admin view