More Related Content
Similar to Ruby On Rails (20)
More from Gautam Rege (13)
Ruby On Rails
- 10. Overall Comparison Rails Pylons cgi/perl Web-frameworks Plug-ins / auto-installation Object Oriented Nature Weak References (leaks) Garbage Collection Loose Data Typing Data Types: Arrays, Hash Ruby Python Perl Features
- 26. A word about RESTfull Rails Routes: map.resources :teams
- 35. Part 3 – Hands-on work Building a Rails Application
- 38. Rails Project Layout ..../app ......../controller ......../helpers ......../models ......../views ............/layouts ..../config ..../components ..../db ..../doc ..../lib ..../log ..../public ..../script ..../test ..../tmp ..../vendor ......../plugins Core Application code: Controllers, Helpers, Models, Views Configuration for database, initializers,routes Database migrations Additional or custom libraries, rake tasks etc. The HTDOC for this web project. This contains JS, CSS, images etc. External plugins for this project.
- 50. Named Scope example class Customer < ActiveRecord::Base has_many :bank_accounts named_scope :hni, :conditions => [ ‘hni = ?’ true ] named_scope :high_risk lambda do | list | { :joins => ‘risk_customer_lists’, :conditions => [‘name in (?)’, list ] } End @customers = Customer.hni @customers = Customer.hni @customers = @customers.high_risk(terrorists) @customers = Customer.hni.high_risk(terrorists)