Sha256: 8b220f2cf098d29e1e1942aa2c9e6796afc9b9126a8338c37592dfb52bf703a0
Contents?: true
Size: 698 Bytes
Versions: 13
Compression:
Stored size: 698 Bytes
Contents
class Admin::PrototypesController < Admin::ResourceController after_filter :set_habtm_associations, :only => [:create, :update] helper 'admin/product_properties' def available @prototypes = Prototype.order('name asc') respond_with(@prototypes) do |format| format.html { render :layout => !request.xhr? } end end def select @prototype ||= Prototype.find(params[:id]) @prototype_properties = @prototype.properties respond_with(@prototypes) end private def set_habtm_associations @prototype.property_ids = params[:property][:id] if params[:property] @prototype.option_type_ids = params[:option_type][:id] if params[:option_type] end end
Version data entries
13 entries across 13 versions & 6 rubygems