Skip to content

Instantly share code, notes, and snippets.

Created August 27, 2009 05:00
Show Gist options
  • Save anonymous/176079 to your computer and use it in GitHub Desktop.
Save anonymous/176079 to your computer and use it in GitHub Desktop.
$(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