Displaying 20 results from an estimated 10000 matches similar to: "How to pass search parameter to ruby from index file"
2006 Feb 19
0
looking for more idiomatic way of doing this
I have proposals and members can vote for them. In my proposal view I have a little div
where the currently logged in member can vote:
<div id="vote_div" class="vote">
Your vote:
<% if @member_vote %>
You have voted for this proposal<br />
<%= start_form_tag :action => "delete_vote" %>
<%= hidden_field_tag :id,
2006 Nov 11
1
Disable foms when submitting
Hey,
I want to disable the form when an user submits, I know that u can do
this with javascript. But i dont want to put code for each form on my
website, and I have a lot of forms like..
<%= start_form_tag :action => ''create'' %>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td
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
2006 Nov 04
1
search function
Hey all,
I''m writing a search function for my page but I get stuck at the form
part. When I press submit all the params are nil.
here is my list.rhtml:
<%= start_form_tag :controller=>''ads'', :action => ''search'' %>
<%= render :controller=>''cats'',:partial => ''/cats/search'' %>
<p> <%=
2006 Apr 14
2
Nested AJAX remote_form in form?
I''d like to achieve something that is better described by the following
code:
<%= start_form_tag :action => ''create'' %>
<%= text_area ''place'', ''description'', :cols => 100, :rows => 4 %>
<div id="categories">
<%= form_remote_tag :update => ''categories'',
2006 Aug 09
2
how to access selected value in controller action
I have this in a view:
<%= start_form_tag :action => ''create_price'', :id => @media.id %>
<%= select("media", "price_code_id", PriceCode.find_all.collect {|pc|
[pc.name, pc.id ] }, { :include_blank => false }) %>
<%= submit_tag ''Add Price Code'' %>
<%= end_form_tag %>
My question is, how would I access the
2006 Jan 28
0
Auto drop list: Create a form professional or easy?
Hi all,
I''m searching for a method to dynamically build a form. ( false/true field in
the DB should automatically be a droplist)
If you use "_form.rhtml" it works easy, with only this code in your partial,
but uses the extra file, and doesn''t feel profi and flexible.
<%= start_form_tag :action => ''create_product'' %>
<%= render
2007 Apr 20
1
Problem with form_tag
Hi all!
I''ve seen this problem in several places in the list, but none of the
remedies suggested seem to be helping me much.
I have a view like so:
HELLO
<% form_tag :action => "create" do %>
<p>My pretty form!</p>
<p><%= text_field "foo", "bar" %></p>
<p><%= submit_tag "Do
2006 Jul 21
1
Newbie Question about Ruby on rails---cant upload data
Hi everybody,
Ruby on Rails is my first programming lenguage...it looks to me like i''m
missing the big picture. I''m trying to upload a file into a database.
In my app. my user needs to select a file and upload it...however I only
want him to upload certain information from that file. I have written
code to parse only string tables from that file. For example, the table
2006 Jan 04
3
How Can I solve this?
this may be an easy question, but i am unable to solve it:
i want to take the selected choice and process it in the controller:
TEMPLATE:
<%=start_form_tag :action => ''get_article'' %>
<select name=pricelist>
<%= options_from_collection_for_select (@customers, "id", "name") %>
</select>
<%= submit_tag "Get" %>
2006 Jun 30
4
Serious noob question. Any help would be great
Hi All,
I''m working on building an app that can log and edit phone call
information. I''ve got the creating and editing parting working great,
and I''ve started an attempt to add searching. I can''t seem to figure
out how to get an [:id] parameter from a form and passed between two
controller methods. Right now I have a web page with a single text
field in it
2006 Jul 24
2
Newbie error message!
hello you all,
I''m new with Ruby on Rails. I''m developing an application. I got the
follwoign erro, can anybody give a hand?
ArgumentError in AdminController#import_strings
wrong number of arguments (0 for 1)
RAILS_ROOT: ./script/../config/..
Request
Parameters: {"commit"=>"Import",
2006 May 18
2
attempt to override the ''tag'' method
I want to override the ''tag'' method in
ActionView::Helpers::TagHelper to do some generalized
error handling similar to the way scaffolding puts a
red border around fields that fail validation.
I''ve created a file lib/rails_patches/tag_helper.rb
which contains the following.
module ActionView
module Helpers
module TagHelper
alias_method :orig_tag, :tag
2006 Jan 13
2
Change Password with acts_as_authenticated
I want to have a form to change a users password. I can''t figure out
what the method in the controller should look like. I tried @user.save
and @user.update_attributes, but can''t get it to work.
My Form:
##############################
<%= start_form_tag :action => "update_password", :id => @user.id %>
<%= password_field ("user",
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(
2006 May 10
2
gain value from form
I have the following form
<%= start_form_tag :action => ''rejectQuoteSave'', :id => @project %>
<p><label for="offer_reason_rejected"><span class="required">*
</span>Reason</label><br/>
<%= text_area ''offer'', ''reason_rejected'' %></p>
<%= submit_tag
2006 Jan 03
1
options_from_collection_for_select - NIL Object
i am kind of desparated
i try with options_from_collection_for_select to get option values, but
it says
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.inject
but @customers is not empty ->
def get_customer
@customers=Customer.find_all
end
i have tested it and also the attributes "id"
2006 Jan 04
2
noob help
I am writing an app with i18n , so my main.rhtml has this option
<%= start_form_tag :action => ''lang_hi'' %>
<%= select "Lang","language",[''Telugu'',''Hindi'']%>
<%= submit_tag "Go" %>
<%= end_form_tag %>
the above way i am able to call only one action , is there a way i can
call any
2006 Jan 09
1
Modifying script generated scaffold output Books/Authors
People,
For my little book library db I find the rails script generated stuff
fine for most of my needs but there is one thing I couldn''t figure
out . .
Part of the auto output of app/view/books/edit.rhtml is:
<%= start_form_tag :action => ''update'', :id => @book %>
<%= render :partial => ''form'' %>
<%= submit_tag
2006 Mar 05
1
Help with Self-Referential HABTM
With the help of the Rails Recipes have got a self-referential HABTM
relationship working, but I''m really struggling with getting a new entry
from a form accepted. i should say here that the form is also submitting
info for the join table too.
So in my model I have:
class Type < ActiveRecord::Base
has_and_belongs_to_many :subtypes,
:class_name => ''Type'',