{"id":14,"date":"2008-06-27T11:31:17","date_gmt":"2008-06-27T06:01:17","guid":{"rendered":"http:\/\/www.smallguru.com\/?p=10"},"modified":"2008-06-27T11:31:17","modified_gmt":"2008-06-27T06:01:17","slug":"rails-video-tutorial-2","status":"publish","type":"post","link":"https:\/\/www.ar-cad.com\/smallguru\/2008\/06\/rails-video-tutorial-2\/","title":{"rendered":"Rails Video Tutorial 2 &#8211; What Rails is"},"content":{"rendered":"<p>In this post, the following Concepts are explained<\/p>\n<ol>\n<li>Web Applications and Rails<\/li>\n<li>What Rails can Do<\/li>\n<li>Where Rails Came From<\/li>\n<li>Rails Philosophies<\/li>\n<li>More Rails Philosophies<\/li>\n<li>MVC<\/li>\n<li>Model<\/li>\n<li>View Part 1<\/li>\n<li>View Part 2<\/li>\n<li>Controller<\/li>\n<\/ol>\n<h2>Web Applications and Rails<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/KfVrqxywEc4&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/KfVrqxywEc4&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>Basic introduction to Web applications in general. The architecture of Web browser(Cleint) and Server(which also includes a Database) is explained. <a href=\"http:\/\/en.wikipedia.org\/wiki\/Model-view-controller\" target=\"_blank\">Model-View-Controller<\/a> architecture of Rails is also explained very well. A must see for newbies.<\/p>\n<hr style=\"display: block;\" \/>\n<h2>What Rails can Do<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/xteOz0RCq-c&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/xteOz0RCq-c&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>Examples of usages of Ruby on Rails in some of the Deployed and running web applications. The author also explains a web app he had developed with Rails (Please dont be upset with the layout of this app, the functionality matters ). The app developed by him shows the power of Rails prototyping at a much faster rate compared to other frameworks. He also goes on to explain different Rails website showcased on <a href=\"http:\/\/www.rubyonrails.org\/\" target=\"_blank\">Rubyonrails<\/a> official website.<\/p>\n<hr style=\"display: block;\" \/>\n<h2>Where Rails Came From<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/SkMEq2osbSg&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/SkMEq2osbSg&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>This explains the background for the development for Ruby on Rails.  A company based out of Chicago by name <a href=\"http:\/\/www.37signals.com\" target=\"_blank\">37Signals<\/a> hired a smart developer from Denmark by name <a title=\"David Heinemeier Hansson\" href=\"http:\/\/en.wikipedia.org\/wiki\/David_Heinemeier_Hansson\" target=\"_blank\">David Heinemeier Hansson<\/a> to work on a Collaborating Web-app <a title=\"Basecamp (software)\" href=\"http:\/\/en.wikipedia.org\/wiki\/Basecamp_%28software%29\" target=\"_blank\">Basecamp<\/a> .  Because of the Geographical distance between them, an interesting Design pattern and philosophy was developed which has crept its way into Ruby on Rails. Rails has been extracted into a framework from a product (BaseCamp), which is not quite the usual case. The author also recommends to watch the <a href=\"http:\/\/media.rubyonrails.org\/video\/rubyonrails.mov\" target=\"_blank\">Video presentation by David<\/a> on Rails and its background.<\/p>\n<hr style=\"display: block;\" \/>\n<h2>Rails Philosophies<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/4POGzw8itVU&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/4POGzw8itVU&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>This covers the Philosophies behind Rails<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Don't_repeat_yourself\" target=\"_blank\">DRY (Dont Repeat Yourselves)<\/a><\/p>\n<p>One piece of information should be present only at a single place. Most of the code should be placed only once in specific places based on<a href=\"http:\/\/en.wikipedia.org\/wiki\/Model-view-controller\" target=\"_blank\"> MVC<\/a> paradigm. This makes the code highly efficient and easy to maintain.<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Convention_over_Configuration\" target=\"_blank\">Convention over Configuration<\/a><\/p>\n<p>Rails follows certain Conventions, that is it has defaults for most aspects of putting together a web application. If you follow these conventions, you can develop Web apps rapidly not bothering about a lot of Configurations which you would otherwise do in Java or normal PHP. This also makes your code base very minimal<\/p>\n<hr style=\"display: block;\" \/>\n<h2>More Rails Philosophies<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/eamOt6-kf9I&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/eamOt6-kf9I&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>Another philosophy behind Rails is <a href=\"http:\/\/www.agilemanifesto.org\" target=\"_blank\">Agile Development<\/a>.  It emphasizes more on important things rather than conventional standards. In the following list, the items in bold text have emphasis over the normal text.<\/p>\n<ul>\n<li><strong>Individuals and interactions<\/strong> over processes and tools<\/li>\n<li><strong>Working software<\/strong> over comprehensive documentation<\/li>\n<li><strong>Customer collaboration<\/strong> over contract negotiation<\/li>\n<li><strong>Responding to change<\/strong> over following a plan<\/li>\n<\/ul>\n<hr style=\"display: block;\" \/>\n<h2>MVC<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/tChwE45wzAI&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/tChwE45wzAI&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>A brief history and introduction to MVC architecture. The pattern was first described in 1979 by <a title=\"Trygve Reenskaug\" href=\"http:\/\/en.wikipedia.org\/wiki\/Trygve_Reenskaug\" target=\"_blank\">Trygve Reenskaug<\/a>, then working on <a title=\"Smalltalk\" href=\"http:\/\/en.wikipedia.org\/wiki\/Smalltalk\" target=\"_blank\">Smalltalk<\/a> at <a title=\"Xerox PARC\" href=\"http:\/\/en.wikipedia.org\/wiki\/Xerox_PARC\" target=\"_blank\">Xerox PARC<\/a><\/p>\n<p>The components of MVC are Model-View and Controller.<\/p>\n<ol>\n<li>Model maintains the state of your application.<\/li>\n<li>View is responsible for generating User Interface through which a website user interacts with it<\/li>\n<li>Controller can be perceived as the part which controls and co-ordinates the View and Model.<\/li>\n<\/ol>\n<p>In Rails, M-V-C files are under separate folders and Model and Controller files have .rb extension whereas View files have a .rhtml(html with Ruby Code embedded) or .rjs (JavaScript embedded with Ruby Code).In Rails, the MVC works as follows.<\/p>\n<p>A URL from Web-browser interacts with a Controller (not a View directly). Controller then interacts with Model which makes queries into the Database. The Database replies with the output to Model which will return to Controller in the form of Object Oriented array, which can be manipulated and then sent to the View which renders the html and Javascript on the Web-browser.<\/p>\n<hr style=\"display: block;\" \/>\n<h2>Model<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/50mTv5N6Lzc&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/50mTv5N6Lzc&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>Model interacts with database and maintains state of the database in a Rails Application.   In Rails, we extensively use <a href=\"http:\/\/en.wikipedia.org\/wiki\/Active_record\" target=\"_blank\">Active Record<\/a> which is a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\" target=\"_blank\">ORM (Object-Relational Mapping )<\/a> mechanism. Every model-class in Rails app corresponds to a Table in our Database.  Every attribute in a model-class is mapped to a column in the corresponding database table. All these are done automatically once you instantiate a Model (Thanks to Rails, which takes care of this headache ). Author also shows and explains some Code of a model class. The ActiveRecord is intelligent enough to update itself with any Database changes you make. So it truly uses DRY i.e you dont have to make any changes in the Model file after you make changes in the Database. He also explains the syntax of a Model file(tech.rb), which is<\/p>\n<p>[sourcecode language=&#8217;ruby&#8217;]<br \/>\nclass Tech < ActiveRecord::Base   #Tech as a subclass of ActiveRecord Class\nhas_many: work_requests    # one to many mapping, work_requests is another model-class\nhas_many: assigned_teches\nhas_many: work_requests_notes\n\ndef self.login(name,password)\nfind(:first, :condtions => [&#8220;name = ? and password = ?&#8221;, name, password])<br \/>\nend<\/p>\n<p>def try_to_login<br \/>\nTech.login(self.name, self.password)<br \/>\nend<br \/>\nend<br \/>\n[\/sourcecode]<\/p>\n<hr style=\"display: block;\" \/>\n<h2>View Part 1<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/OU0owyGHpeY&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/OU0owyGHpeY&amp;hl=en\"><\/embed><\/object><br \/>\nSummary:<\/p>\n<p>View is the Part of the MVC architecture which renders or parses the generated html and javascript code to the Browser. Compared to Model and Controller files(.rb) which are Classes and have only Ruby code in them, View files(.rhtml or .rjs) have html and\/or javascript code and have Ruby code embedded in them between &lt;% &#8230;some ruby code&#8230;%&gt;<\/p>\n<p>The author shows and explains a simple Recipe list which has Recipes with add\/edit\/delete and search functionalities. He goes through the Controller code which will in-turn parse to View to render html to browser. Name of the Controller file and Controller class are related and is generated by Rails. In this example, the controller&#8217;s class name is RecipeController and the controller file name is recipe_controller.rb , which is as follows<\/p>\n<p>[sourcecode language=&#8217;ruby&#8217;]<br \/>\nclass RecipeController < ApplicationController  # Subclass of ApplicationController\n\ndef list  #function or method. An important convention is that it parses a view file by the same name. i.e list.rhtml and is not explicitly mentioned\n@all_recipes = Recipe.find(:all)  #It finds all the recipes and stores in instance variable 'all_recipes'\nend\n\ndef view\n@a_recipe = Recipe.find(params[:id])   #it finds a recipe with a given id\n@all_recipes = Recipe.find(:all)     #It finds all the recipes\nend\n\ndef show_add_recipe\nend\n\ndef search\ntitle = \"%\" + @params[:title] + \"%\"\n@all_recipes = Recipe.find(:all, :condtions=>[&#8220;title like ?&#8221;, title])<br \/>\nend<\/p>\n<p>def add_recipe<br \/>\n@a_recipe = Recipe.new(params[:new_recipe])<br \/>\n@a_recipe.save<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>def delete_the_recipe<br \/>\nRecipe.find(params[:id]).destroy<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>def edit_recipe<br \/>\n@recipe_to_edit = Recipe.find(params[:id])<br \/>\nend<\/p>\n<p>def save_recipe<br \/>\n@recipe_to_update = Recipe.find(@params[:a_recipe_id])<br \/>\n@recipe_to_update.update_attributes(@params[:recipe_to_edit])<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>end<br \/>\n[\/sourcecode]<\/p>\n<hr style=\"display: block;\" \/>\n<h2>View Part 2<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/JdZOVzwAQs4&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/JdZOVzwAQs4&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>From the previous Video, we look at list.rhtml. It is called by &#8216;list&#8217; method\/function in RecipeController class. The beauty of Rails is that you dont have to specify the name of the View file, its convention is to have the Controller class name itself. In this case it is list.rhtml whose content is as follows<\/p>\n<p>[sourcecode language=&#8217;html&#8217;]<br \/>\n<html><br \/>\n<head><br \/>\n<title>Recipe List <\/title><br \/>\n<\/head><br \/>\n<body><\/p>\n<p style=\"color: green\"><%= flash[:notice] %> <\/p>\n<p><%= render(:partial => &#8216;the_list&#8221;)%><\/p>\n<p><\/body><br \/>\n<\/html><br \/>\n[\/sourcecode]<\/p>\n<p>In the above snippet of code, the major part is normal html. The Ruby code is put between &lt;% &#8230;some code &#8230; %&gt; if its not printing anything on the browser . If you are outputting or printing something, we use &lt;%= ..some code.. %&gt;.<\/p>\n<p>The line &lt;%= render(:partial =&gt; &#8220;the_list&#8221;) %&gt;  renders another view, in this case its a partial view. The partial views can only be called from main views and hence can be used repeatedly at many places. The partial view file is named _the_list.rhtml . There is an underscore before the file name to distinguish it as a partial view. The contents of &#8216;_the_list.rhtml&#8217; file is as follows<\/p>\n<p>[sourcecode language=&#8217;html&#8217;]<\/p>\n<table border=\"0\"><% for a_recipe in @all_recipes%> <!-- @all_recipes was the instance variable from RecipeController. It is taken in a loop where each iteration variable is 'a_recipe' --><\/p>\n<tbody>\n<tr>\n<td><%=link_to \"View Recipe\", :action=> &#8216;view&#8217;, :id=> a_recipe %><\/td>\n<td><%=a_recipe.title %><\/td>\n<td><%=a_recipe.description %><\/td>\n<td><%=link_to \"Edit\", :action=> &#8216;edit_recipe&#8217;, :id=> a_recipe %><\/td>\n<td><%=link_to \"Delete\", :action=> &#8216;delete_the_recipe&#8217;, :id=> a_recipe %><\/td>\n<\/tr>\n<p><% end%> <!-- for loop end --><\/p>\n<\/tbody>\n<\/table>\n<hr \/>\n<p><%= render(:partial => &#8220;search_form&#8221;)%><br \/>\n<%= link_to \"Add New Recipe\", :action => &#8216;show_add_recipe&#8217; %><br \/>\n[\/sourcecode]<\/p>\n<p>In the above snippet of code,<\/p>\n<ul>\n<li> @all_recipes which is parsed from RecipeController is taken on a Loop.<\/li>\n<li> On every iteration, variable &#8216;a_recipe&#8217; is rendered in a new table-row.<\/li>\n<li> To print the title of a recipe, we use a_recipe.title and similarly for description, we use a_recipe.description.<\/li>\n<li> In &lt;%= link_to &#8216;View Recipe&#8221;, action=&gt; &#8216;view&#8217;, :id=&gt; a_recipe %&gt; , link_to is a Ruby function which builds an anchor or link with text &#8220;View Recipe&#8221; and clicking on it will trigger &#8216;view&#8217; function in RecipeController and parses &#8216;id&#8217; as an argument.<\/li>\n<li> &lt;%= render(:partial =&gt; &#8220;search_form&#8221;) %&gt; will render &#8220;_the_search_form.rhtml&#8221; file<\/li>\n<\/ul>\n<hr style=\"display: block;\" \/>\n<h2>Controller<\/h2>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/92eyuiXq194&amp;hl=en\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"344\" src=\"http:\/\/www.youtube.com\/v\/92eyuiXq194&amp;hl=en\"><\/embed><\/object><\/p>\n<p>Summary:<\/p>\n<p>Controller can be thought of a co-ordinator between a model and a view. A controller is usually called by a URL from the web-browser. Say there is a URL request of http:\/\/0.0.0.0:3000\/recipe\/list , it directly goes to controller recipe, whose filename is recipe_controller.rb and whose class name is RecipeController. All these would seem a bit confusing at first, but once you are familiar with the conventions, it would be a cake walk in future. The next part of the url after the controller name is &#8216;list&#8217;, which is the function name inside &#8216;recipe&#8217; controller.<\/p>\n<p>Lets explore &#8216;recipe_controller.rb&#8217; file<\/p>\n<p>[sourcecode language=&#8217;ruby&#8217;]<br \/>\nclass RecipeController < ApplicationController # Subclass of ApplicationController, Class is i\n\ndef list #function or method. An important convention is that it parses a view file by the same name. i.e list.rhtml and is not explicitly mentioned\n@all_recipes = Recipe.find(:all) #It finds all the recipes and stores in instance variable 'all_recipes'\nend\n\ndef view\n@a_recipe = Recipe.find(params[:id]) #it finds a recipe with a given id\n@all_recipes = Recipe.find(:all) #It finds all the recipes\nend\n\ndef show_add_recipe\nend\n\ndef search\ntitle = \"%\" + @params[:title] + \"%\"\n@all_recipes = Recipe.find(:all, :condtions=>[&#8220;title like ?&#8221;, title])<br \/>\nend<\/p>\n<p>def add_recipe<br \/>\n@a_recipe = Recipe.new(params[:new_recipe])<br \/>\n@a_recipe.save<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>def delete_the_recipe<br \/>\nRecipe.find(params[:id]).destroy<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>def edit_recipe<br \/>\n@recipe_to_edit = Recipe.find(params[:id])<br \/>\nend<\/p>\n<p>def save_recipe<br \/>\n@recipe_to_update = Recipe.find(@params[:a_recipe_id])<br \/>\n@recipe_to_update.update_attributes(@params[:recipe_to_edit])<br \/>\nredirect_to :action => &#8216;list&#8217;<br \/>\nend<\/p>\n<p>end<br \/>\n[\/sourcecode]<\/p>\n<p>In the following snippet of code, RecipeController class is made a sub-class of ApplicationController, meaning it derives all the properties of ApplicationController (Inheritance property of OOP). The class should always be terminated by &#8216;end&#8217;<br \/>\n[sourcecode language=&#8217;ruby&#8217;]<br \/>\nclass RecipeController < ApplicationController\n.....\n.....\nend\n[\/sourcecode]\n\nIn the following snippet of code, 'list' is a function\/method. It is defined by keyword 'def' followed by its name. It is terminated by 'end'. Whatever is in between them is executed upon calling the function. In this case, there is a ActiveRecord Model named 'Recipe'. Recipe.find(:all) will interact with recipe corresponding table in database and get all the rows. The relational data from database is converted into Object by ActiveRecord and it is assigned to instance variable @all_recipes in the form of an array. Once this is done, the function will then call the view file with the same name as its, and parse the instance variables. In this case, it would be 'list.rhtml' as we had covered in the previous video summary.\n[sourcecode language='ruby']\ndef list\n@all_recipes = Recipe.find(:all)\nend\n[\/sourcecode]\n\nSince a Controller is the co-ordinator for Views and Models, if we have less code in View and more in Controller, it would become easy to maintain and update the code.\n\n\n\n<hr style=\"display: block;\" \/>Disclaimer: The Screencasts are not recorded by me. I have just embedded them from Youtube. The original Videos area a part of <a href=\"http:\/\/www.vtc.com\/products\/ruby-on-rails-tutorials.htm\" target=\"_blank\">Virtual Training Company<\/a>, who give Online Training and the author for Ruby on Rails Series is Mr. Al Anderson.  If you are benefited from these, you may register there by paying certain amount or order a CD from them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, the following Concepts are explained Web Applications and Rails What Rails can Do Where Rails Came From Rails Philosophies More Rails Philosophies MVC Model View Part 1 View Part 2 Controller Web Applications and Rails Summary: Basic &hellip; <a href=\"https:\/\/www.ar-cad.com\/smallguru\/2008\/06\/rails-video-tutorial-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[7],"tags":[28,30],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-video-tutorials","tag-web20"],"_links":{"self":[{"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":0,"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ar-cad.com\/smallguru\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}