Skip to content

Instantly share code, notes, and snippets.

View blizzerand's full-sized avatar
👨‍💻
Inventing

Manjunath blizzerand

👨‍💻
Inventing
View GitHub Profile
Model.where('your conidtion')
Model.find(:all,:conditions => {} )
User.where("admin =?",true)
Model.where().order().select()
Model.where().order().select().all
RentHouse::Application.routes.draw do
...
...
...
end
ActionController::Routing::Routes.draw do |map|
...
...
...
end
resources :products do
resources :comments
resources :sales do
collection do
get 'recent'
end
end
end
resources :products do
resources :comments
resources :sales do
get 'recent' :as => "collection"
end
end
end
match 'product_description', :to => "products#description"