lib/puffer/base.rb in puffer-0.0.7 vs lib/puffer/base.rb in puffer-0.0.8

- old
+ new

@@ -4,10 +4,11 @@ include Puffer::Controller::Mutate include Puffer::Controller::Helpers include Puffer::Controller::Dsl include Puffer::Controller::Config + include Puffer::Controller::Generated respond_to :html, :js def index @records = resource.collection @@ -26,22 +27,22 @@ end def create @record = resource.new_member @record.save - respond_with @record, :location => resource.index_path + respond_with @record, :location => resource.collection_path end def update @record = resource.member @record.update_attributes resource.attributes - respond_with @record, :location => resource.index_path + respond_with @record, :location => resource.collection_path end def destroy @record = resource.member @record.destroy - redirect_to (request.referrer || resource.index_path) + redirect_to (request.referrer || resource.collection_path) end end end