Ruby on Rails Interview Questions and Answers

Ruby on Rails Questions and Answers:

1 :: Why RubyonRails?

Super productive new way to develop web applications because:

1. Dynamically typed programming language similar to Python,
Smalltalk, and Perl(Templating language)
2. Follows Model-View-Controller (MVC) architecture
3. Strives for simplicity
4. Less coding.
5. Minimum Configuration.
6. Design patterns admire
7. Light webserver
8. ORM
0/5 Rating (0 vote)
Is This Answer Correct?    2 Yes 0 No
Place Your Answer

2 :: What is session and cookies?

Session is used for maintaining the particular value
throughout the session..(browser closed)

e.x: session[:value]="poornimad"

this values is not changed until the browser closed..

Cookies:
*********
This is used to store the values in the Browser..this
value is not delete till the cookies are deleted..This
cookies concept is same as Java cookies.The concept is same.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

3 :: Whats the difference between symbol and string?

Rails makes extensive use of symbols. A symbol looks like a
variable symbols name, but it’s prefixed with a colon.
Examples of symbols include :action,:line_items, and :id.

Rails uses symbols to identify things. In particular, it
uses them as keys when naming method parameters and looking
things up in hashes. For example:
redirect_to :action => "edit", :id => params[:id]
1/5 Rating (1 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

4 :: What the difference between static scaffolding and Dynamic scaffolding?

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
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

5 :: Why do we use request.xhr? in rails?

Conventional web application transmit information to and
from the sever using synchronous requests. This means you
fill out a form, hit submit, and get directed to a new page
with new information from the server.
When you interact with an Ajax-powered web page, it loads an
Ajax engine in the background. In response to an event web
application passes asynchronous request (XMLHttpRequest or
xhr). In fact it is javaScript object/method that performs
asynchronous interaction with the server, JavaScript object
that performs asynchronous interaction with the server and
behind the scene fetches data. and behind the scene fetches
data.
We do request.xhr? only to check the request type, either
its AJAX request or others(post, get).
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

Rate This Category:
0/5 Rating (0 vote)
Place Your Question



Top: Ruby on Rails Interview Questions and Answers
Ruby on Rails Interview Questions and Answers

Top Frequently Asked Ruby on Rails Question
Frequently Asked Ruby on Rails Job Interview Question


Top Frequently opened Computer Programming Job Interview categories
Most popular Computer Programming Job Interview categories

Comments About Ruby on Rails Interview Questions and Answers

Share your valuable opinions, ideas and suggestions about Ruby on Rails Interview Questions and Answers
While placing your comment your email address is required but won't be published any where else; Personal information will be kept confidential; we do not sell or release our respective visitors private information.
  1. Webmaster 23rd of May 2012

    Webmaster Said

    Tell us what you feel about Ruby on Rails Interview Questions and Answers
    All comments will be published after review. No login or registration is required to post a comment on Ruby on Rails Interview Questions and Answers We offer and invite you to submit your valuable comment now; Please be respectful of others when commenting. Insulting others, self-promotional comments, website promotional comments, marketing stuff, SEO Techniques, SMS-style content and off-topic comments will not be approved at this information portal.
    So start sharing your thoughts regarding Ruby on Rails Interview Questions and Answers
    Thank you.

Leave a Comment

Leave a Comment
  1.  Enter This Verification Code  Regenerate Verification Code  



Your reply will be added to the comment above (Below any other replies to this comment) -

Top Comments About: Ruby on Rails Interview Questions and Answers
Comments on Ruby on Rails Interview Questions and Answers

 
Top of Link batk to Ruby on Rails Interview Questions and Answers
Link batk to Ruby on Rails Interview Questions and Answers