search for: posts_url

Displaying 7 results from an estimated 7 matches for "posts_url".

Did you mean: post_url
2007 Jul 02
3
stupid Rails rendering
I dont'' understand why it''s not possible to have a conditional redirection in rendering respond_to do |format| format.js { render :update do |page| page.redirect_to posts_url if @located page.replace_html ''error_message'', "Error..." page << "$(''popup_error'').popup.show();" end } end raise an error... => Can only render or redirect once per action what shoudl do if I don...
2008 Jul 07
0
Getting access to route-generating helpers from a migration
...there any way to get access to a RESTful named route helper from a migration. I''d like to place URLs generated from these routes into a DB table and wanted to manage the static data by using a migration. So I''d like to be able to get at the URL generated by something like "posts_url", for example. Is this doable? Is there some way that I can either include an appropriate module in my migration class or directory interrogate the Routing class to get this URL? Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ Yo...
2011 May 09
0
rails guides - getting started - section 10 security
...dit" } format.xml { render :xml => @post.errors, :status => :unprocessable_entity } end end end # DELETE /posts/1 # DELETE /posts/1.xml def destroy @post = Post.find(params[:id]) @post.destroy respond_to do |format| format.html { redirect_to(posts_url) } format.xml { head :ok } end end end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this...
2007 Jun 03
3
remote_form_for issue
Hi everybody, I''m trying to change my current forms in my app to remote_forms. It was my understanding that remote_form_for and form_for work in the same way, so I just wanted to change the methods. My code looks like: <% form_remote_for :post, :url => posts_url do |f| %> <%= render :partial => ''form_posts'', :locals => {:f => f} %> <%= table_submit_tag "Chercher" %> <% end %> The problem of this code is that it generates an empty form: <form id="foo" onsubmit="new Ajax.Reques...
2008 Jan 08
3
What happened to _form.rhtml partial in rails 2.0??
Just wondering if anyone could point me to a good explanation of why the latest way of doing things does not include using something like _form.html.erb partials in RESTful rails 2.0?? Why did we move away from partials, etc?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2011 May 19
0
Unable to find the image path via file system using the paperclip plugin through the get method
...:xml => @post.errors, :status => :unprocessable_entity } end end end # DELETE /posts/1 # DELETE /posts/1.xml def destroy @post = Post.find(params[:id]) @post.destroy respond_to do |format| format.html { redirect_to(posts_url) } format.xml { head :ok } end end end Please find the code for my index.html.erb file:- <h1>Listing posts</h1> <table> <tr> <th>Message</th> </tr><br/> </table> <% for pos...
2007 May 31
16
Could anyone please help with rspec/nested resource behavior checking?
My problem has been listed here: http://railsforum.com/viewtopic.php?pid=25439#p25439 Don''t think it would be required to completely re-type it here :) Thanks! -- -Daniel Fischer http://danielfischer.com - Geek Blog http://abigfisch.com - Portfolio http://writersbeat.com - Writing Community