Rails Set Variable In View, So you can call @type in the view or any partial.