Created
April 7, 2009 03:16
-
-
Save collin/91082 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class ContentsController < ApplicationController | |
| def update id, content | |
| @content = Content.get id | |
| if @content.update_attributes_from_params_hash content | |
| redirect content_url(@content, :action => :show), :message => { | |
| :notice => "#{h(@content_type.name)} was successfully saved"} | |
| else | |
| message[:error] = "#{h(@content_type.name)} failed to be saved" | |
| render :edit | |
| end | |
| end | |
| end |
This file contains hidden or 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
| "content" => { | |
| "55" => "<p>Collin's company makes software that lets its users build their own web sites, without any programming.</p>", | |
| "56" => "41.878003,-93.097702", | |
| "46" => "", | |
| "40" => "Collin's Company", | |
| "51" => "" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment