Created
August 27, 2009 05:00
-
-
Save anonymous/176079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('.team_title').editable("name", { | |
type : 'text', | |
rows : 8, | |
cancel : 'Cancel', | |
submit : 'OK', | |
tooltip : 'Double-click to edit...', | |
submitdata: { | |
authenticity_token: =form_authenticity_token.to_json, | |
} | |
}) | |
}); | |
--> This produces Syntax error, something's wrong with the }) things. | |
def name | |
@team = Team.find(params[:id]) | |
respond_to do |format| | |
if @team.update_attributes(params[:team]) | |
flash[:notice] = 'Team was successfully updated.' | |
format.js { redirect_to profile_team_path } | |
format.xml { head :ok } | |
else | |
format.js { render :action => "edit" } | |
format.xml { render :xml => @team.errors, :status => :unprocessable_entity } | |
end | |
end | |
This is my controller |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment