This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| :pr08 => | |
| {:pays=>nil, :ville=>nil, :num=>nil, :lg_adr1=>nil, :lg_adr2=>nil, :lg_adr3=>nil, :cp=>nil, :lg_adr4=>nil}, | |
| :pr04 => | |
| {:pays=>nil, :ville=>nil, :num=>nil, :lg_adr1=>nil, :lg_adr2=>nil, :lg_adr3=>nil, :cp=>nil, :lg_adr4=>nil}, | |
| :pr09 => | |
| {:pays=>nil, :ville=>nil, :num=>nil, :lg_adr1=>nil, :lg_adr2=>nil, :lg_adr3=>nil, :cp=>nil, :lg_adr4=>nil}, | |
| :pr05 => | |
| {:pays=>nil, :ville=>nil, :num=>nil, :lg_adr1=>nil, :lg_adr2=>nil, :lg_adr3=>nil, :cp=>nil, :lg_adr4=>nil}, | |
| :pr10 => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT `campaigns`.*, distinct campaigns.* FROM `campaigns` INNER JOIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| search = Product | |
| search = search.where(:product_type => "jeans") | |
| search = search.where(:brand => "levis") | |
| @products = search.all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| search = Product | |
| search = search.where(:product_type => "jeans") | |
| @products = search.all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RAILS 2 | |
| ============= | |
| map.resources :profile | |
| profile_index GET /profile(.:format) {:action=>"index", :controller=>"profile"} | |
| new_profile GET /profile/new(.:format) {:action=>"new", :controller=>"profile"} | |
| GET /profile/:id/edit(.:format) {:action=>"edit", :controller=>"profile"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| profile POST /profile(.:format) {:action=>"create", :controller=>"profiles"} | |
| new_profile GET /profile/new(.:format) {:action=>"new", :controller=>"profiles"} | |
| GET /profile/edit(.:format) {:action=>"edit", :controller=>"profiles"} | |
| GET /profile(.:format) {:action=>"show", :controller=>"profiles"} | |
| PUT /profile(.:format) {:action=>"update", :controller=>"profiles"} | |
| DELETE /profile(.:format) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Association named 'inventory_items' was not found; perhaps you misspelled it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| preload_associations(results, [:pictures, :brand, :product_type, :available_inventory_items, :active_sale]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @brand = Brand.find_by_url_name!(params[:brand]) if params[:brand].present? | |
| search = Product.where(:brand, @brand) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| def get_brands(limit = nil) | |
| @brands = cache("#{sub_menu_cache_key}:brand_list") do | |
| @brands = Brand.joins(:products => [:sales]).merge(Sale.active).merge(Product.with_stock).to_sql | |
| end | |
| end | |
| end | |
| #ActiveRecord::ConfigurationError: Association named 'inventory_items' was not found; perhaps you misspelled it? |