Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what the difference between static scaffolding and Dynamic
scaffolding?

Answers were Sorted based on User's Feedback



what the difference between static scaffolding and Dynamic scaffolding?..

Answer / vinit baheti

With Rails 2.0, you may have noticed that dynamic
scaffolding breaks–that is, if you have a controller with
scaffold :model_name in it, all the scaffolded actions–new,
delete, index–no longer exist! In Rails 2.0, you can only
generate static scaffolding–that is, you can use the
scaffold to generate the files for controllers, models, and
views.

What’s more, Rails 2.0 allows you to specify the model
attributes inside the scaffold. This then creates views with
all the appropriate fields, and it also creates the
migration with all the fields in it! Excellent!

As an example, say we wanted to create a blog-post model. We
could generate it like so:

script/generate scaffold Post title:string content:text
category_id:integer

You’ll notice Rails will generate, among other things:

* A post.rb model file
* A posts_controller.rb controller file
* A posts view folder containing views for the index,
show, new, and edit actions
* A DB migration called xxx_create_posts
* A unit-test, fixtures file, and helper

Everything you need–indeed, everything the dynamic
scaffolding provided–is included, albeit as static content.
All you need to do is migrate your DB and you’re up and flying!

So the main difference is, with dynamic scaffolding you can
generate new, edit and delete methods but with static
scaffolding you can't

Is This Answer Correct ?    11 Yes 0 No

what the difference between static scaffolding and Dynamic scaffolding?..

Answer / vikrant chaudhari

Hi,

Static scaffolding is present in rails 1.0 version with the
comand
"ruby script/server geterate scaffold Product Admin".
Here, Product is model and Admin is controller.So it (Rails
1.0)automatically generates the table column defined in
products table
CONCLUSION:SCAFFOLDING IN RAILS 1.0 TAKES TWO PARAMETERS
1.MODEL
2.CONTROLLER

While in dynamic scaffolding u need to create model and
controller one by one

Is This Answer Correct ?    15 Yes 7 No

what the difference between static scaffolding and Dynamic scaffolding?..

Answer / ilango

dynamic scaffolding is

when you give the line scaffold :model_name in your
controller ruby will automatically generate all the
appropriate data interfaces at runtime.

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More Ruby on Rails Interview Questions

Difference between argument and parameter in ruby on rails ?

0 Answers  


write a program to show the usage of sql in the database file?

0 Answers  


What are the steps involved in writing and setting up an application in ruby on rails?

0 Answers  


What are the functions performed by rails migration?

0 Answers  


What does ruby name refer to?

0 Answers  


What is the function of orm in ruby on rails?

0 Answers  


Explain the features of ruby on rails.

0 Answers  


Mention all the naming conventions in ruby on rails.

0 Answers  


Explain some features of nested scaffolding.

0 Answers  


What is a webrick web server?

0 Answers  


How can you protect filter methods in rails?

0 Answers  


What are the different filters used in ruby on rails?

0 Answers  


Categories