Create rails app with scaffold

Total Blog Views: 50

Blog Status: publish

Created By: asad_fazlani Created at: 08-15-2021

Tags: web development ruby ruby on rails scaffold

Create Ruby and Rails app with Scaffold  Step by step guide :

What is Scaffold:

Scaffold Gernerate Model , view , controller.if you are beginner want to create rails app then this is the simplest form of  create crud (create ,read ,update ,delete) operation.

before starting scaffold you need created rails app click here to know how to create rails  app (for beginners).

now you need to generate scaffold using below command:

rails generate scaffold blog image:string title:string body:text 

output of above command.

Now we have to run migration using rails db:migrate command.

we have succefully created crud with ruby on rails.

run rails routes. 

run your rails app (rails s command).

on http://localhost:3000/blogs you find scaffold output .

click on New blog to create blog.

Now after fill all feild then create blog.

 

Feel free to ask question in comment for more click here


asad_fazlani

Technical Blogger at shadbox



Comments



  • swazahmad | almost 4 years ago
    Awesome Information Thanks For Sharing
Buy traffic for your website

About Shadbox

we have the “Get things executed” lifestyle at our place of work. There are not any excuses, no if’s or however’s in our dictionary. committed to navigating the ship of creativity to create cell answers, we resolve the real-lifestyles troubles of our clients and their clients. Our passion for work has won us many awards, year after 12 months.

Services

Downloads