Sha256: d1906d0142fe0d1c24dc9d5f055c7202ea4798dd9806449dfdf889a1fa239a66

Contents?: true

Size: 767 Bytes

Versions: 20

Compression:

Stored size: 767 Bytes

Contents

class Admin::PropertiesController < Admin::BaseController
  resource_controller
  
  before_filter :load_object, :only => :filtered
  belongs_to :product
  
  def filtered
    @properties = Property.find(:all, :conditions => ['lower(name) LIKE ?', "%#{params[:q].downcase}%"], :order => :name)
    render :template => "admin/properties/filtered.html.erb", :layout => false
  end
  
  new_action.response do |wants|
    wants.html {render :action => :new, :layout => false}
  end

  # redirect to index (instead of r_c default of show view)
  update.response do |wants| 
    wants.html {redirect_to collection_url}
  end
  
  # redirect to index (instead of r_c default of show view)
  create.response do |wants| 
    wants.html {redirect_to collection_url}
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 app/controllers/admin/properties_controller.rb
spree-enriquez-0.9.4 app/controllers/admin/properties_controller.rb
spree-0.9.4 app/controllers/admin/properties_controller.rb
spree-0.9.3 app/controllers/admin/properties_controller.rb
spree-0.9.2 app/controllers/admin/properties_controller.rb
spree-0.9.1 app/controllers/admin/properties_controller.rb
spree-0.9.0 app/controllers/admin/properties_controller.rb
spree-0.8.4 app/controllers/admin/properties_controller.rb
spree-0.8.5 app/controllers/admin/properties_controller.rb
spree-0.4.0 app/controllers/admin/properties_controller.rb
spree-0.4.1 app/controllers/admin/properties_controller.rb
spree-0.5.0 app/controllers/admin/properties_controller.rb
spree-0.5.1 app/controllers/admin/properties_controller.rb
spree-0.6.0 app/controllers/admin/properties_controller.rb
spree-0.7.1 app/controllers/admin/properties_controller.rb
spree-0.7.0 app/controllers/admin/properties_controller.rb
spree-0.8.0 app/controllers/admin/properties_controller.rb
spree-0.8.1 app/controllers/admin/properties_controller.rb
spree-0.8.2 app/controllers/admin/properties_controller.rb
spree-0.8.3 app/controllers/admin/properties_controller.rb