| Issue 150: | [filen] replacement for content_nodes doesn't work | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Create a new content, for example a snippet
2. Attach an image file
3. Try to reference the image file from within the snippet using [file1]
What is the expected output? What do you see instead?
[file1] should be replaced with the path to the newly uploaded image.
What version of the product are you using? On what operating system?
1.0 I think. Linux.
Please provide any additional information below.
The fix is as follows:
@content_node.content.gsub!("[file#{files_saved}]", new_file.public_filename)
should be
@content_node.content = @content_node.content.gsub("[file#{files_saved}]",
new_file.public_filename)
It appears that rails doesn't notice that the content attribute is dirty
and needs persisting if you use the ! in place gsub.
//matt
Jan 25, 2009
Project Member
#1
subim...@gmail.com
Status:
Fixed
|