-
Notifications
You must be signed in to change notification settings - Fork 0
Rails
Chenthill Palanisamy edited this page Jul 11, 2016
·
4 revisions
Ruby on Rails is an extremely productive web application framework written in Ruby by David Heinemeier Hansson.
Rapid Development, Convention over configuration, MetaProgramming,
Easy for Beginners
###Directory Structure app/ This is the folder where you will work most of the time. It contains your model, view and the controller. app/model Contains all your models for your project.
app/view Includes all HTML files inside a folder. These files are named after an corresponding action inside your
controller. Additionally, these files are grouped into folders with the controller name.
app/controller Holds the logic for your Rails application.
db/ All database related files go into this folder. If you are working with SQLite, then the database is
likely to be in this folder as *.sqlite3 file.
db/migrate Has all the migrations that you created.
config/ As the names suggest, it has all the necessary configuration files of your Rails application. There is
only very little configuration needed, so no worries that you have to crawl through endless lines of
code. Localizations, routes and all basic files can be found here.
public/ All your static files (files that do not change dynamically) your CSS or JavaScript files are inside this
folder.
public/images All your static Images
public/javascripts When you embed Javascript, CSS or images, the default location is inside these folders. Rails will
automatically look inside these to find the proper file.
public/stylesheets When you embed CSS, the default location is inside this folder. Rails will automatically look
inside this to find the proper file.
script/ Holds scripts for Rails that provide a variety of tasks. These scripts link to another file where the
"real" files are. Inside these folder you will find the generators, server and console.
log/ Log files from your application. If you want to debug some parts of your application you can check out
these files.
test/ All files for testing your application.
doc/ Documentation for the current Rails application.
lib/ Extended modules for your application.
vendor/ Whenever you have 3rd-party plug ins, they will be found in this folder.
tmp/ Temporary files
README Basic guide for others on how to setup your application, what specialities it has or what to be careful
about.
Rakefile Handles all the Rake tasks inside your application.
###Active Record
###Action Controller
###Action View
###References [Ruby on Rails Tutorial - Michael Hartl] (https://www.railstutorial.org/book)
[Course era] (https://www.coursera.org/specializations/ruby-on-rails)
[Tutorials Point] (http://www.tutorialspoint.com/ruby-on-rails/rails-introduction.htm)