Update rails.markdown

some refactoring