Displaying 20 results from an estimated 70000 matches similar to: "Re: problem in check_box"
2006 Oct 15
2
Getting check_box to default to checked?
I''ve tried this (in a new method/template -- so @type doesn''t actually
exist yet):
check_box ''type'', ''notify_on_create'', {:checked=>''true''}
But :checked seems to get swallowed. I''ve also tried setting
notify_on_create to true in the Type model, but that doesn''t work
either. Any way to get the
2007 Dec 15
3
check_box not being checked
I''m new to RoR and I''m having a little problem that I can''t solve.
My model is simple. I have Lists and ListItems.
I have a view that loops through all the list items, and I put the
HTML for the each list item row in a partial called _list_item.rhtml.
This is the view, called show.rhtml
<ul>
<%= render(:partial => "list_item", :collection =>
2007 Apr 30
0
check_box
I am sure this is a trivial problem for a rails guru!
all I want to do is display an appropriately cheched check_box in a
table, so:
instead of
<% for t in @patient.histories%>
<tr>
<td><%= t.ihd %></td>
</tr>
<%end%>
I want something like:
<% for t in @patient.histories%>
<tr>
2006 Nov 27
0
Problems using check_box
Hello!
Since this is my first post here and I''m fairly new with the whole RoR
concept, please bare with me (just wanted that to be out in the open)!
;D
I''m trying to make a checkbox for each input in another
model/database-table.
I have a database table called Roster which includes the colums "id" and
"name".
And then I have a table called matches that
2008 Feb 13
6
trouble updating partial from collection
I have a view where I render a partial over a collection. Each instance
of the partial includes a <div> with an id specific to that instance.
Inside the partial, there is a select tag for "year". I''m trying to
change some of the contents of the partial when user changes the year.
I''m using this in the view:
<%= select_tag :year,
2007 Sep 25
2
Character limit for text field
I was just wondering if there is a way to limit the number of characters
that can be entered in a textfield? Here is what I have for a helper:
<%= text_area ''user'', ''rentalcar_comments'', :size => "69x4" %>
I am describing a size but I need it to only allow a certain number of
characters and no more. Is that possible or am I going to have to
2007 Apr 16
6
How to use a form.check_box ?
Hey guys,
I''m trying to have a simple webform in my administration section to
add a user. I have the text_fields for adding the user''s name,
password, and password confirmation, but cannot seem to figure out the
checkbox. I want it to be a single checkbox, that if clicked, will set
the database column "access" to be "admin" and if its unchecked, set
it to be
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to.
But what if I want to make an .rjs call with that button?
Seems like we need something equivalent to link_to_remote, so that the
button can make an ajax request instead submitting the form.
Or am I missing the point entirely?
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Sep 10
2
Issue with radiobutton and remote_function in IE.
Hi there!
I did implemented the radio button with remote_function to update some
div via RJS.
It works perfect with FireFox, but behaves weird with IE. When I click
the radio button
it loads data (I see the indicator showing) but not updates the div with
info until I click
left mouse button anywhere.
It''s weird =(
Here is the snippet from .rhtml code
<td>
2009 Jun 23
7
can't get remote_function working on rails 2.3.2
I''ve tried moving the code around in different ways, but so far I
haven''t gotten remote_function to work for me (I''m using Rails 2.3.2 on
my Mac). I want to make an AJAX call when I double-click a word on my
page, and the Javascript function is being called when the ondblclick
event is fired, but nothing happens when it gets to my the "new
Ajax.Request" part
2009 Mar 23
1
Ajax not defined.
This is my code and I am trying to call remote function when somebody
click on add button after selecting something from select_tag. Please
tell me where I am wrong ? I am getting following error: Ajax not
defined.
<input type="button" value="< Add" class="button" onclick="<%=
remote_function(:url => {:controller => ''users'',
2008 Sep 08
1
ActiveRecord::StatementInvalid Error
Hi There,
I''m gettings the following errors while accessing my application.
Can someone please tell what is the possible cause and can it
be resolved.
"
ActiveRecord::StatementInvalid in Site#showalladdress
Showing site/showalladdress.rhtml where line #3 raised:
Mysql::Error: #42000You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version
2008 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then
back to a partial?
I have a form rendering a partial that i would like to update with a
call to my controller based on user selectable parameters, but when the
AJAX comes back, i get this error message because i cannot pass a form
builder object between the controller and the view:
"undefined method
2008 Nov 21
15
Switching the version of Rails that an app uses
Hi All,
I’ve got a few versions or Rails installed and I''d like to run an App
I’m developing with various versions of Rails. I heard of two ways to
switch the version of Rails that an app uses:
1. Use GitHub as described by http://kylecordes.com/2008/04/30/git-windows-go/
. But that requires using Bash in a Command Window and more steps
than I want to go through.
2. Alter
2007 Sep 12
1
update_attribute_with_validation_skipping
Does anyone know anything about:
update_attribute_with_validation_skipping(name, value)
I have read the documention, but, I must say, as much as I love ruby and
rails, their documention lacks a lot, especially in the areas of
examples and good, sound explanations of what methods do and how the
function. The above method is a good example of this. What does the
parameter ''name''
2007 Feb 14
2
prepend_before_filter
I''ve got a couple of before_filters that need to run in a specific order. One does a redirect_to if a session variable isn''t set. The other does a find which will fail if the session variable isn''t set. So they need to run in that order. But prepend_before_filter doesn''t seem to be working as advertised. Anybody got any insight? I''m still running
2008 May 22
9
Retrieving Mutliple Records using find_by_*
I was hoping that AR''s find_by_* magic methods would help me retrieve
multiple items somewhat like the following:
names_to_find = [''Larry'', ''Moe'', ''Curly'']
found_people = Person.find_by_name(names_to_find)
Is there a way to accomplish this using find_by_* (or even find(:all)
using some sort of conditions) or must I resort to SQL
2009 Apr 02
1
"can't modify frozen string" error in Ajax.Updater
I''ve just deployed my RoR app to a host that uses dispatch.cgi instead
of Mongrel and came across this issue when using AJAX. The same issue
has been highlighted a year ago, (on this list) <http://
groups.google.com/group/rubyonrails-talk/browse_thread/thread/
872fed1ff554c9a4> and (on Rails Trac) <http://dev.rubyonrails.org/
ticket/10365>.
In short, when some browsers enact
2007 Aug 07
1
core team email address?
Anybody know if the old rubyonrails.org email address is still valid for questions to the core team?
Thanks,
Bill
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this
2008 May 05
1
Passing values selected with onchange remote_function
How do i pass the value selected from a drop down selection and then
extract it in rjs
<% select("what", "hello", @selection, {}, {:onchange =>
remote_function(:url => "test", :my_variable => "hello again") } ) %>
thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google