Ruby on Rails MVC Framework:- The model view controller principle divides the work of an application into three ways:
- Model: It maintains the relationship between the objects and the database and handles validation, association, transactions and more and it is implemented in Active Record library.
- View: It is a representation of data.It is script based template systems like JSP, ASP,PHP and very easy to integrate with AJAX technology and it is implemented in Active View library.
- Controller: The facility within the application that directs traffic and it is implemented in Active Controller Library.
Association between Models:- An association defines the relation between two entity objects based on common properties.When you have more than one model in your rails application, then you need to create a connection between them.You can do this via associations.Active Records have following associations:-
- one-to-one:- In one-to-one association, each instance of the first model belongs to each instance of the second model.It has further two associations: belongs_to and has_one
- one-to-many:- In one-to-many association, each instance of the first model belongs to one or more instance of the second model.It has further two associations.These are: has_many and has_many: through.
- many-to-many:- In many-to-many association, two or more instances of the first model belongs to two or more instances of the second model.It contains has_and_belongs_to_many.
Ruby on Rails Controller:- It coordinates the interaction between the user, the views, and the model.It is the logical center of your application.It is responsible for routing external requests to internal actions.It manages caching, sessions and manages helper modules, which extend the capability of the view templates without bulking up their code.
Ruby on Rails Routes:- This routing module provides URL rewriting. It's a way to redirect incoming requests to controllers and actions. It replaces the mod_rewrite rules. Best of all, Rails' Routing works with any web server.
Ruby on Rails View:- A Rails View shares data with controllers through mutually accessible variables.If you look in the app/views directory of the library application, you will see one subdirectory for each of the controllers. Each of these subdirectories was created automatically when the same-named controller was created with the generate script.
Ruby on Rails File Upload:- Rails make it very easy for a visitor to upload file on the server with the help of test files.After that install the gemfiles.
Ruby on Rails Layout:- Layout is a place where you define a common look and feel of your final output.It defines the surroundings of an HTML Page.It defines a layout template and then letting the controller know that it exists and to use it.
Ruby on Rails Scaffolding:-Rails scaffolding is a fastest way to generate some of the major pieces of an application. If you want to create the models, views, and controllers for a new resource in a single operation, scaffolding is the tool for the job. With the help of Scaffolding,You can quickly get code in front of your users for feedback. Also,You can learn how Rails works by looking at the generated code.
Ruby on Rails Migrations:- Rails Migration allows using Ruby to define changes to your database schema.In other words, Migration is a convenient way to change the database schema over time in a very easy way.
Ruby on Rails Emails:- One of the Rails components is Action Mailer that enables applications to send and receive emails.
Active Record Validations: Validation is the act of checking that only valid data is saved into your database. For example, it may be important to your application to ensure that every user provides a valid email address and mailing address.
Ruby on Rails Web Development Services in India:- There are a lot of Ruby on Rails Web Development Companies in India which provides ruby web development services like Code Garage Tech(Mohali), Enzigma Software Pvt Ltd(Pune), Sigma info solutions Ltd(Bangluru) etc. Code Garage Tech is a leading Ruby on Rails development company.