Convert Sitecore item into RenderingModel for MVC 2

WP Upload Directory not writable! Check file and directory permissions
Following code helps to add in item extension class or helper class to convert Sitecore item into Sitecore.Mvc.Presentation.RenderingModel. I have added code and extended in local Habitat Foundation project. public static RenderingModel AsRenderingModel(this Item item) { RenderingContext renderingContext = RenderingContext.CurrentOrNull; Assert.IsNotNull(renderingContext, "RendreingContext is null"); // get rendering var rendering = renderingContext.Rendering; Assert.IsNotNull(rendering, "Rendreing is null"); ...