![]() App/helpers: The helper’s sub-directory holds any helper classes used to assist the view, model and controller classes.ĩ.The controller sub-directory is where Rails looks to find controller classes App/controllers: A web request from the user is handled by the Controller.What is the role of sub-directory app/controllers and app/helpers? Built-in-testing: It supports code called harness and fixtures that make test cases to write and execute.Ĩ.Three environments: Rails comes with three default environment testing, development, and production.Convention over configuration: Unlike other development framework, Rails does not require much configuration, if you follow the naming convention carefully.Scaffolding: Rails have an ability to create scaffolding or temporary code automatically.The Rails version of Active Record identifies the column in a schema and automatically binds them to your domain objects using metaprogramming Active Record: It saves object to the database through Active Record Framework.Ruby is considered as one of the best language for Meta-programming. ![]() Meta-programming: Rails uses code generation but for heavy lifting it relies on meta-programming.In Ruby False indicates a Boolean datatype, while Nil is not a data type, it have an object_id 4.ħ. What the difference is between false and nil in Ruby? ORM or Object Relationship Model in Rails indicate that your classes are mapped to the table in the database, and objects are directly mapped to the rows in the table.Ħ. What is ORM (Object-Relationship-Model) in Rails? Controller: Controller class names are represented in plural form, such that OrdersController would be the controller for the order table.Ī Ruby method that receives a code block invokes it by calling it with the “Yield”.ĥ.Model: It is represented by unbroken MixedCase and always have singular with the table name.Database Table: The database table name should have lowercase letters and underscore between words, and all table names should be in the plural form for example invoice_items.Class and Module: Modules and Classes uses MixedCase and have no underscore each word starts with a uppercase letter.Variables: For declaring Variables, all letters are lowercase, and words are separated by underscores.Rails: It is a framework used for building web applicationĬlass libraries in Ruby consist of a variety of domains, such as data types, thread programming, various domains, etc.ģ.Ruby: It is an object oriented programming language inspired by PERL and PYTHON.Ruby on Rails Interview Questions for freshers experienced :.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |