app/controllers/triumph/achievements_controller.rb
def create
      @achievement = Achievement.new(params[:triumph_achievement])
      @achievement.observe_class.singularize.downcase!

      if @achievement.save
        achievement_condition = AchievementCondition.new(params[:achievement_condition])
        achievement_condition.achievement_id = @achievement.id
        if achievement_condition.save
          redirect_to(@achievement, :notice => 'Achievement was successfully created.')
        else
          flash[:error] = "Failed to save achievement conditions"
        end
      else  
        render :action => "new"
      end
    end
def create
      @achievement = Achievement.new(params[:triumph_achievement])
      @achievement.observe_class.singularize.downcase!

      if @achievement.save
        achievement_condition = AchievementCondition.new(params[:achievement_condition])
        achievement_condition.achievement_id = @achievement.id
        if achievement_condition.save
          redirect_to(@achievement, :notice => 'Achievement was successfully created.')
        else
          flash[:error] = "Failed to save achievement conditions"
        end
      else  
        render :action => "new"
      end
    end
POST /achievements
 POST /achievements.xml