Posts

Create drag and drop functionality in ruby on rails

Some simple steps required to create the rails application First of all we will create a simple application first to create the products. 1. The first Step we required to create the Rails Application. $ rails new SampleSortRails 2. By using the scaffold we will generate the  the MVC components needed for Simple Products application form $ cd SampleSortRails $ rails g scaffold Product name:string description:text quantity:integer price:integer sort:integer 3. Create the Products database table:   $ rake db:create $ rake db:migrate Rails uses  rake  commands to run migrations.  Migrations are Ruby classes that are designed to make it simple to create and modify database tables. Rails uses  rake  commands to run migrations. 4. Then we need to set routes of our application. $ rake routes Prefix Verb URI Pattern Controller#Action products GET /products(.:format) ...