Skip to content

Instantly share code, notes, and snippets.

@gramos
Created August 11, 2010 14:58
Show Gist options
  • Save gramos/519105 to your computer and use it in GitHub Desktop.
Save gramos/519105 to your computer and use it in GitHub Desktop.
View:
<% form_for(@post) do |f| %>
<%= f.error_messages %>
<%= fckeditor_textarea("post", "post", :toolbarSet => 'Easy',
:width => '100%', :height => '400px') %>
<% end %>
------------------------------------------------------------------------
controller:
def update
if @post.update_attributes(params[:post])
flash[:notice] = 'Post was successfully updated.'
redirect_to post_permanent_link_url(@post)
else
load_current_user_post_recents
render :action => "edit"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment