Ruby on Rails - Ruby on Rails - View MVC- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Ruby on Rails - View - MVC
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - mvc - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/mvc-web-model.gif)
Ruby on Rails - View in mvc :
- Erb for ruby & html
- Hamlimproves on erb
- Textile for html
- Sass for css
#content
.left.column
%h2 Welcome to our site!
%p= print_information
.right.column= render "sidebar"
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
<div id='content'>
<div class='left column'>
<h2>Welcome to our site!</h2>
<p><%= print_information %></p>
</div>
<div class="right column">
<%= render "sidebar" %>
</div>
</div>
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view.png)
ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Ruby on Rails - Embedded Ruby - View in MVC :
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - embedded ruby - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-embedded-ruby.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - embedded ruby - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-embedded-ruby-html-erb.png)
Ruby on Rails - Hypertext Abstraction Markup Language (HAML) - View in MVC :
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - embedded ruby - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-erb-embedded-ruby.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - reusable erb - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-partial-erb-embedded-ruby.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - reusable erb - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-partial-erb-embedded-ruby-1.png)
Ruby on Rails - Hypertext Abstraction Markup Language (HAML) - link_to - View in MVC :
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - link_to - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-link_to-erb-embedded-ruby-1.png)
Ruby on Rails - rails form_for - haml - form_for - mvc - view:
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - form_for - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-form_for-erb-embedded-ruby-1.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - form_tag - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-form_tag-erb-embedded-ruby-1.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - form_tag - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-form_tag-erb-embedded-ruby.png)
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - haml - view helpers - mvc - view - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-view-haml-view-helpers-erb-embedded-ruby.png)
ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Web Application Process in ruby on rails - MVC web server access :
Step 1 : A user clicks a link to a page in a web application
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : A user clicks a link to a page in a web application - ruby on rails examples](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-jobs.png)
Step 2: The web server recieves the request URL (Universal Resource Location - Uniform Resource Locator). Rails uses a routes file to match the URL with a controller action.
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : The web server recieves the request URL (Universal Resource Location - Uniform Resource Locator). Rails uses a routes file to match the URL with a controller action.](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-routes-controller.png)
Step 3: The invoked controller action requests data from a model. The model queries the database and hands data back to the controller
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : The invoked controller action requests data from a model. The model queries the database and hands data back to the controller](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/model-controller-mvc-pattern-ruby-on-rails.png)
Step 4: The controller action then passes data to a corresponding view. The view uses the data and a template to compose a page.
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : The controller action then passes data to a corresponding view. The view uses the data and a template to compose a page](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/controller-view-in-mvc-ruby-on-rails.png)
Step 5: The controller passes the complete page to the web server.
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : The controller passes the complete page to the web server.](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/controller-in-mvc-ruby-on-rails.png)
ruby on rails tutorial tags - ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby
Step 6: The web server serves the page to the browser. The browser renders the new page in place of the first one.
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : The web server serves the page to the browser. The browser renders the new page in place of the first one.](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-web-server.png)
Step 7: Ruby on Rails provides a framework for this MVC flow. It enables developers to work on what makes their apps unique rather than spend time re-implementing conventions.
![learn ruby on rails - ruby on rails tutorial - ruby on rails - rails code - model view controller - mvc - ruby on rails mvc web server access : Ruby on Rails provides a framework for this MVC flow. It enables developers to work on what makes their apps unique rather than spend time re-implementing conventions.](https://wikitechy.com/tutorials/ruby-on-rails/img/ruby-on-rails-images/ruby-on-rails-mvc-complete-web-page-life-cycle.png)