app/controllers/admin/feature_relations_controller.rb
#
# The create.before wasn't being called (couldn't figure out why not; update.before works
# fine), so create is done manually for now. This should be fixed.  
#
The create.before wasn't being called (couldn't figure out why not; update.before works
fine), so create is done manually for now. This should be fixed.
The create . before wasn ' t being called ( couldn ' t figure out why not ; update . before works fine ) so create is done manually for now . This should be fixed .
def create
    process_feature_relation_type_id_mark
    @object = FeatureRelation.new(params[:feature_relation])
    respond_to do |format|
      if @object.save
        flash[:notice] = 'Feature Relation was successfully created.'
        format.html { redirect_to(polymorphic_url [:admin, parent_object, object]) }
        format.xml  { render :xml => @object, :status => :created, :location => @object }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @object.errors, :status => :unprocessable_entity }
      end
    end
  end
def create process_feature_relation_type_id_mark @object = FeatureRelation . new ( params [ :feature_relation ] ) respond_to do | format | if @object . save flash [ :notice ] = 'Feature Relation was successfully created.' format . html { redirect_to ( polymorphic_url [ :admin , parent_object , object ] ) } format . xml { render :xml => @object , :status => :created , :location => @object } else format . html { render :action => "new" } format . xml { render :xml => @object . errors , :status => :unprocessable_entity } end end end
The create.before wasn't being called (couldn't figure out why not; update.before works
fine), so create is done manually for now.
The create . before wasn ' t being called ( couldn ' t figure out why not ; update . before works fine ) so create is done manually for now .