Displaying 1 result from an estimated 1 matches for "lookups_url".
2008 Jul 29
0
handling multiple lookup tables in rails
...format.xml { render :xml => @lookup.errors, :status
=> :unprocessable_entity }
end
end
end
# DELETE /lookup/1
# DELETE /lookup/1.xml
def destroy
@lookup = @theModel.find(params[:id])
@lookup.destroy
respond_to do |format|
format.html { redirect_to(lookups_url, :mdl=>@mdl) }
format.xml { head :ok }
end
end
private
def setup_tables
# I assume there is some way to instantiate a class with a
string name but I did this
# just to try to get something working
if params[:mdl] == "CollectionType"
@mdl =...