similar to: start_form_tag not taking url_for options

Displaying 20 results from an estimated 20000 matches similar to: "start_form_tag not taking url_for options"

2007 May 28
2
helper with block compile error
HI, i''m trying to write a helper that replaces link_to_remote that accepts a block but it gets a compile error in the template: I don''t know what I''m doing wrong... TIA # application_helper.rb def link_block_to_remote( options = {}, html_options = {}, &block) concat(link_to_remote(capture(&block), options, html_options), block.binding) end # in
2006 Feb 21
2
start_form_tag with method GET
Hi, How can I get start_form_tag to use GET instead of POST? I have tried... <%= start_form_tag {:action => ''search''}, {:method => ''get''} %> But it doesn''t work... compile error ./script/../config/../app/views/search/index.rhtml:35: syntax error _erbout.concat(( start_form_tag {:action => ''search''}, {:method =>
2006 Feb 07
3
Newbie help ..
Hi .. I am new to Rails and it is not clear to me why I am getting the following error. Any help appreciated. -m. $cat app/views/admin/new.rhtml <% @page_title = "New member..." -%> <%= start_form_tag( :action => ''create'' ) %> <table> <tr> <td> First Name: </td> <td> <%= text_field(
2005 Dec 22
2
routes and url_for
Hi, All. I try to relocate controllers. Admin space controlers moved to /app/controllers/admin and user space controllers to /app/controllers/user In routes.rb I use map.connect ''search'', :controller => ''user/search'' that correct I see. But when I want to use start_form_tag or simply url_for, that used in start_form_tag, I do not know how generate url
2006 Jul 12
5
start_form_tag n00b question
Hi, I''m wondering if there is any way to specify the id of a form tag with the start_form_tag helper. I''ve tried playing around with ", id=>"marginForm" " and also inclosing both the action variable and id variable in curley brackets. The Rails API doesn''t off much help for a n00b like me. It''s probably really easy but any help you guys
2006 Feb 13
2
how to find the helpers code ?
Hello, i have the application set up on my radrails. I was looking at the view generated by scaffold and i see a bunch of names, after looking up internet i found that they are helpers and generate the HTML for us. Now, i wanted to look at the helper code for start_form_tag, so that based on that i could write some of my own helpers in my helper classes... but i could not find the code
2007 Apr 09
8
How do I use link_to with all the current options?
In one of my pages I want to create some URLs that go to the same page, but tack on an extra parameter (column sorting stuff). How do I do that? I''ve tried link_to "Title", :sort => "title" and that''s pretty close...it keeps the controller name, but it doesn''t include one of the parameters. I''m using nested routes, so the URL should
2006 Apr 15
8
I need to send an email when something happens in my model...
but the model isn''t the right place to send mail from. That just seems like pretty bad coupling, generating emails from within the model. Or is that not a problem? On top of that, these emails need to contain links back to my site...which is a bit of a pain in ActionMailer, but I found directions on http://wiki.rubyonrails.com/rails/pages/HowtoUseUrlHelpersWithActionMailer however I
2006 Mar 31
4
I feel stupid - help with Element.show
This isn''t Rails-specific, and I''m sorry for that, but I haven''t been able to get a response in the #prototype/#javascript/#ror channels, nor find anything via Google. I have a form element that I want to be hidden when the page first loads, and appear when a user clicks the link. Here''s the code: <div id=''signin-link''><%= link_to
2006 Dec 20
16
Edge RSpec on Rails...what did I forget?
Started a new Rails project, and installed RSpec and the Rails plugin vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/trunk/rspec) - 1332 vendor/plugins/rspec_on_rails (svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails) - 1332 Generated the rspec file, created a model...the spec runs fine if I do ruby spec/models/foo_spec.rb. Running rake though gives
2006 Jun 20
8
Integrating multiple applications
I''ve got a couple apps that I use (billing app, support ticket app, some other custom apps) that I want to integrate into one site. They will all use the same layout for the most part, and will link between each other. When I initially thought of doing this, I figured if I put the apps at different roots - /billing /support etc - then the links wouldn''t work at all, because
2006 Jan 29
16
counting rows via associations
Hi: I have a table called clients and each client has many lists (a has_many and belongs_to has been created in the class. What I need to do is get a count of the rows in each list for each client. I was hoping I could do something like client.lists.count but it does not seem to work. Any suggestions? bruce
2006 Feb 22
8
filtering "tags" via checkboxes - HABTM
First post/newbie post... bear with me. What I''m trying to achive (music site): A system containing tracks and moods with a HABTM relationship. I''ve got all that set up and functioning in the admin environment - i.e. admins can apply a variety of moods to a particular track via a series of checkboxes. Join table works just fine. I''m currently stuck on allowing
2006 Jun 22
2
[PLUGIN] url_for_with_prefix - allowing you to modify/remove prefixes easily
Here''s the readme. I think it''s okay to post this kind of thing to the mailing list. Anyway, hopefully someone else finds this useful. UrlForWithPrefix ================ By Pat Maddox Very simple plugin, adds the :prefix option to url_for. Say in your environment.rb file you''ve got ActionController::AbstractRequest.relative_url_root = "/super" Any time
2006 Jun 27
3
start_form_tag question..
i am trying to get a start_form_tag working, but i am shooting blanks.. here''s what i am trying to do.. i have a controller called "forms.." with an action "new_entry".. it is called by: localhost/forms/new_entry this is just a quick form to test another action.. that action is: localhost/logger my question is, how do i construct start form tag in order to
2008 Mar 05
7
mocking successive return values
I''m having a problems mocking successive return values. I don''t know if I''m doing something wrong or if this is a limitation of rspec mocks. Any ideas of what I may be doing wrong? I''m trying to test the generate_quote_number method. It generates a quote number, looks to see if it is in the db already. If it is, it calls itself to try again. I want
2006 Mar 14
8
The RoR equivalent of out.write() in JSP?
All, In JSP, I can output strings in the Web page by either <%= foo %> //foo is a string or returns a string or <% out.write("test") %> //write directly to the output stream. What is the method of "writing to the output stream" in RoR? Basically, what is the equivalent of out.write()? I have an if then statement that I want to put around a call to h
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now. After reading tons of stuff about REST, I don''t really get it. I need to see an example. I''d like someone to write up an example blog app with these requirements - RESTful using the simply_restful plugin (or edge rails) - allows posting of comments to articles - has categories for posts No need
2006 May 30
1
Posting a form to a secure target?
All, If I want my form action to be a secure target, what is the best way to go about doing that? I''m trying to do: <%= start_form_tag( { :protocol => ''https://'', :host => request.host + '':3001'', :action => ''login'' } ) %> in my view, but this doesn''t seem to generate a URL with https:// and my SSL host in
2006 Aug 15
1
Question on start_form_tag and get post method
Hi all, I have a simple question about start_form_tag. It default generates method=post. I was wondering how you could use start_form_tag to generate method=get. Probably a simple question but one I can''t answer with the API doc. Thanks in advance, Onno