similar to: How to not display :id in link_to URL

Displaying 20 results from an estimated 5000 matches similar to: "How to not display :id in link_to URL"

2006 Feb 20
1
Form linking question
Hello all. I currently have a method that is accessed from a form using this: View: <%= start_form_tag :action => :history %> <p><label for="componentlog_cl_compname">Component Name</label><br /> <%= text_field ''componentlog'', ''cl_compname'', :class => ''mandatory'', :value =>
2006 Jan 18
5
Exception not caught?
Hello all. I have started reading up on exceptions and tried replacing a manual check with one. Given the following code: def results begin @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname = ?", params[:componentlog][:cl_compname].strip] ) rescue ActiveRecord::RecordNotFound render_text "<p class=''center''>No
2006 Jan 26
1
Help constructing a find_by_sql command
Hello all. I am trying to do the equivalent of: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page, :order => "cl_spr DESC" ) in a find_by_sql statement. I cannot use the build in because the adaptor isn''t quite right (OCI8) When I use it I get the following error
2006 Jan 25
4
Cannot :order when using :offset and :limit in find
Hello all. I am using the Paginate_with_ajax code as described on the wiki but I am running into the following problem. The following code will work fine and retrieved unsorted records in a hunky dory fashion: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page ) However if I try and add an
2006 Jan 16
8
AJAX + Table.
Hello all. I am trying ot load table rows using AJAX based on a search. The following code results in: 1. Firefox renders correctly (Multiple rows inserted into page). 2. Opera renders the entire returned string in one <td> by the looks of it (Bunched up under first header, the <> tags arne''t visible) 3. IE6 does nothing....great ;) This is driving me nuts so any help
2006 Mar 07
6
form_tag - directing to new target window
How do I use... <%= link_to "All Facilities", :action => ''fac_log_all'' %> if I add :target => "_new" that is just a parameter and not a directive. I just want reports to print into a separate window. How do I do that? It''s not clear at all to me Craig
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2006 May 18
6
Form actions with additional parameters
Hiall, I want to give the action of a form an additional parameters but can''t figure out how to do it. My code looks like this <%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag
2006 Jun 01
9
Image upload
ok, im done, the plugins file_column and acts_as_attachment doesnt seems to work for me, i want a simple thing, upload images, resize it to 216px width, save its filename to a table and save the file to the /public/images directory, i have searched a lot but all the examples are too complex, im starting with rails. If someone can post a example code for the view, controller and model(if any)
2006 Mar 06
2
Computer Inventory: Problems Retaining Values in a Forms
This is my first rails app and I am creating a Computer Inventory system as practice. The problem I am having seems trivial, but I can not figure out what exactly is going wrong, so this is where help from those of you who are more experienced is needed. I am having problems retaining the values in some of my forms. Everything works fine when I am creating or editing a Computer in the inventory
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 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 Apr 08
2
Add id to form_tag?
Hi all, What is the correct syntax to add an id attribute to a form tag with the "form_tag" helper? I''ve tried start_form_tag({:controller => ''houses'', :action => ''find''}, {:method => :get, :id => ''search''}) start_form_tag({:controller => ''houses'', :action =>
2006 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to http://curentpage/?filter=searchtext (the filtering code is already written) it would look like this: <%= start_form_tag(url_for_options = {<something>}) %> <%=text_field (<my_filter>) %> <%= submit_tag(value = "Search")%> any idea how to do this? thanx in advance
2005 Dec 23
2
NewbieQ: How do you specify a name for a form
In start_form_tag howw do you specify the form name?? Eric
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using select_tag into link_to ? Basically I want to do something like: <%= select_tag( "name", options_for_select(%w{John Doe Jane })) %> <%= link_to "Delete", { :controller => "myname", :action => "add", :id => name },
2006 Jan 19
9
start_form_tag not taking url_for options
I''ve got a form that should post to user/login. The code to start the tag is: <%= start_form_tag { :controller => "user", :action => "login" } %> That gives me this exception: compile error script/../config/../app/views/user/login.rhtml:1: parse error, unexpected tASSOC, expecting ''}'' _erbout = ''''; _erbout.concat((
2006 Mar 23
2
newbie - form_tag with get?
I can''t create a form with method "get". The rhtml code: <%= form_tag :controller => ''teritory'', :action => ''add'', :method => ''get'' %> The generated html code: <form action="/teritory/add?method=get" method="post"> What i''m doing wrong? -- They say money can''t
2006 Mar 08
4
unless connected? + multiple databases
Hello all. I am still having fun with multiple databases. In this case it is the unless connected? statement. ActiveRecord::Base establishes a connection that is inherited by the majority of my models. However one Model (Componentlog) that uses a separate DB is coded as: unless Componentlog.connected? establish_connection( :adapter => "oci", :database =>
2009 Jul 02
7
Params Merge and URL sorting/pagination
Hi all, Here''s my general setup on the specific template I''m having issues with: will_paginate for pagination custom methods for sorting 1-form for team search 1-form for search by date When searching for a team for instance, the url returned will be: /rushing_offenses?search=Florida When searching by date, the url returned will be: /rushing_offenses?compiled_on=2009-07-02