Displaying 2 results from an estimated 2 matches for "projectnot".
Did you mean:
projectnote
2006 Mar 01
0
Rails AJAX scaffold generator question: organization
...ry pleased with the ease
of this first test. But my question is how I should incorporate this
into my actual app. In my app, the table I want to use this AJAX on
belongs_to another table. I have one main controller in the app,
Project. In the test app I built for the ajax test, i have
"ProjectNote" as the controller I generated.
In my app, I don''t ever want to edit notes in general, I only want to
edit/create them in the context of the project they belong to. So do I
move the CODE from the ProjectNote controller, and put it in my Project
controller? And move/rename the vi...
2006 Mar 01
0
TextHelpers in Controller?
I have a controller that saves info to the DB. It''s based on the AJAX
scaffolding code. All I want to do is add a simple_format() function to
it before I save a user-edited text field to the DB. TO convert line
returns to <br>s, etc.
@project_note = ProjectNote.new(params[:project_note])
@project_note.body = simple_format(@project_note.body)
Since this happens in a controller, I guess it''s not kosher to use
viewer code, and Rails doesn''t let me. (Some interesting discussions
back from January 05 in the mail archives). I see lots of...