Sha256: 76ddd0bf4a5608353cb774fd80a228b623894ceaa92f0615658d192ae9b9423c
Contents?: true
Size: 803 Bytes
Versions: 5
Compression:
Stored size: 803 Bytes
Contents
class Admin::PropertiesController < Admin::BaseController resource_controller before_filter :load_object, :only => :filtered belongs_to :product def filtered @properties = Property.where('lower(name) LIKE ?', "%#{params[:q].mb_chars.downcase}%").order(:name) render :template => "admin/properties/filtered.html.erb", :layout => false end new_action.response do |wants| wants.html {render :action => :new, :layout => !request.xhr? } 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 destroy.success.wants.js { render_js_for_destroy } end
Version data entries
5 entries across 5 versions & 1 rubygems