Displaying 5 results from an estimated 5 matches for "save_com".
Did you mean:
save_ctx
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
....
But now, Joe wants to comment on my review. Here''s what I have done so
far:
(part of the rhtml of the view, displayed on "show_review" action)
... other stuff on my review, then the comment fields ...
<fieldset>
<% form_for :review, :url=> { :action => "save_comment" } do |f| %>
<legend>Add Your Own Comment</legend>
<%= f.hidden_field :review_id %>
<p>
<label for="title">Title</label>
<%= f.text_field :new_comment_title, :size => 40 %>
</p>
<...
2005 Mar 30
2
Production Log Analyzer 1.1.0
...llation
instructions and details.
Sample Output:
Average Request Time: 0.279874593327209
Request Time Std Dev: 0.351590385021209
Slowest Request Times:
ZeitgeistController#goals took 30.889858s
ZeitgeistController#goals took 29.657513s
EntriesController#save_comment took 20.499292s
AccountController#create took 19.539545s
EntriesController#save_comment took 15.46844s
ZeitgeistController#goals took 14.814086s
ZeitgeistController#goals took 13.943129s
ZeitgeistController#goals took 13.113908s...
2007 Sep 22
1
Rails newbie: passing a value to hidden form field, then getting it
...h I have when I
show the page originally (but which is gone when the user hits the
submit button to save their comment. So I am just trying to save the
survey id in a hidden field associated with the form.
In the show.rhtml, I have:
<% form_for :comment, @survey, :url => { :action => :save_comment }
do |form| %>
<%= form.hidden_field "survey", "#{@survey.id}" %>
...
<% end %>
Which results in "ActionView::TemplateError (undefined method `merge''
for "1":String)". 1 is the id of the survey, so I am close. I tried...
2008 Apr 14
2
Problems with nil object
...SC")
@comments = Comment.find(:all, :conditions => [''post_id= ?'',
params[:id] ])
@com = Comment.new(:post_id => params[:post_id])
if flash[:comment]
@comment = flash[:comment]
else
@comment = Comment.new
end
end
def save_comment
if request.post?
@comment = Comment.new(params[:comment])
if @comment.save
flash[:notice] = "Commento inserito con successo"
redirect_to("/home/show_comment/" +
params[:comment][:post_id])
else
flash[:comment] = @co...
2006 Jan 04
5
help with link_to_if, I can''t make it work...
For the life of me I can''t get it to work. Here is an example of my
syntax. I''m trying to make comment.name a link to comment.web_site only
if there is a comment.web_site. Can someone please help?
<%= link_to_if(comment.web_site.length > 0, comment.name,
comment.web_site {"class" => "comment_by"}) %>
--
Posted via