Displaying 20 results from an estimated 5000 matches similar to: "check_box not being checked"
2007 Dec 09
5
Browserized Styles Plugin
Browserized Styles provides a dead simple way to create browser-
specific CSS code for use in a Rails application. All you need to do
is create a .css file targeted to a browser by appending an underscore
and identifier to the end.
=== Installation ===
script/plugin install http://svn.intridea.com/svn/public/browserized_styles
=== Example ===
Let''s say I have some complex CSS code
2008 Jan 09
4
Using Prototype - Getting Javascript Error - "Object doesn't support this property or method"
I have the following javascript being called on my site and I am
getting a Javascript error - "Object doesn''t support this property or
method". The error is invoked on the line that has - "listItems = $
("vidList").childElements("li");".
The purpose of the Javascript is two fold: ''swapVideo'' to change the
Youtube video and
2007 Jan 12
9
Nil object in E1 capture the order
I''m following the depot application in the rails bible Agile Web
Development with Rails. In interation E1
NoMethodError in Admin#checkout
Showing app/views/admin/checkout.rhtml where line #12 raised:
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.include?
Extracted source (around line #12):
2006 Apr 09
12
Help With Dependent Drop-Down and @Params
Hello All:
I am trying to create a select box that is filled with options based on
the user''s selection in a related drop-down. I have had success with
this before using the examples provided by the following two sources:
One posted by Rory at Rory on Rails - http://www.roryhansen.ca/?p=9
the other posted by Adam at
2006 Aug 10
2
check_box form helper questions/issues
I''m using Rails 1.1.x and it looks like the check_box form helper
expects me to provide and object and method so it can determine if the
checkbox should be checked or not. I''m having a couple of issues with
this.
note: I''m using UserEngine and adding a HABTM so that:
class User < ActiveRecord::Base
has_and_belongs_to_many :foos
end
class foo <
2006 Sep 10
5
why isn't :order working in acts_as_list
Ok, I''m sure this has to be something stupid that I''m doing (or not
doing), but I can''t seem to get things to order by the specified column.
class List < ActiveRecord::Base
has_many :list_items, :order => "orderby"
The error I get back when trying to save the link is:
Unknown column ''position'' in ''order clause'':
2006 Apr 18
2
check_box
I''ve got a question on the use of check_box.
***
This is working but there just has to be a better way:
RHTML:
<% for book in @books do %>
<tr>
<td><%=book.label%></td>
<td>
<%checked = book.subscribed ? ''checked'': ''nope''%>
<%=check_box("book" + book.id.to_s,
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
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that
result in an ajax call that updates two sections on the page. Here is
the code in the controller
def create
...
render :update do |page|
page.replace_html ''list_items'', :partial => ''lists/list_items''
page.replace_html ''add_item'', :partial =>
2006 Nov 15
0
[740] trunk/wxruby2: API - Make ListCtrl#get_item return a ListCtrl item corresponding to a row and
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi,
I would like to put a checkbox on a form where the input field is a
variable rather than a field in a model.
The normal way (with a model) would be:
<%= check_box(''client'', ''accept'', {}, "1", "0") %>
But since accept is a variable @accept and model client will not be
there, how do I make a check box work?
Regards,
Paul
2006 Mar 25
2
Calling an action in another controller
I have two controllers, one for lists and one for list items. When I''m
viewing a list I''d like to have a link to create list items within that
list. How do I go about calling an action in the listitems controller
to create a new item within that specific list?
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Nov 04
0
Check_box woes
I have a User model and an Address model.
A user has_many addresses, and an address belongs_to a user.
An address object for a user could be a billing, shipping or marketing address.
The way I''m tracking this is via the user attributes:
billing_adress_id, marketing_address_id and shipping_address_id in the
user table, which holds the relevant address id.
But in my form that allows a
2006 May 03
1
Differences betwen check_box_tag and check_box form helper.
What is the difference between the check_box_tag and the check_box form
helper?
I can''t understand why both must exist. :(
Thanks.
Fernando Lujan
2008 Apr 12
1
acts_as_tree undefined method?
i have acts_as_tree installed as plugin under rails 2.0.2 and also its
defined in class TreeItems, but when i put this in my view
<ul class="tree_level1" id="cars">Furniture
<% TreeItem.root.category.children do |cat_children| %>
<li><a class="list_item" href="#"><%=h cat_children.name %></a></
li>
<%
2006 Jul 02
10
Use Rails or PHP?
I''m new to RoR and have used PHP. I want to develop a personal
organizer that allows me to add lists (tables) and search them. The
ActiveRecord concept seems to allow me to set up something that works
with an existing table, but I want the ability to add tables without
programming. I know how to do this in PHP and I can put the SQL into
queries in RoR, but does ActiveRecord let
2006 Apr 05
1
select in *.rhtml
I''m trying to get a select box of categories to appear in my items views
after I created everything using generate scaffold, but I can''t get the
categories to appear in my forms.
class ItemsController < ApplicationController
def new
@item = Item.new
@category = Category.find_all
end
...
class Item < ActiveRecord::Base
belongs_to :category
end
class
2006 Jan 29
6
tyro Ruby questin
Trying to print out a simple database grid, using, with column headers
such as ''SunToSatRoles'', ''PrimaryRoles'', etcetera.
Iterating through an object @List which is populated thusly
@list = mymodel.find(:all, :order => mymodel.editlist_order)
When I do something like
<table>
<% for i in @list %>
<tr>
<td><%= i.inspect
2006 May 03
2
disabled check_box does not work as expected?
I have a checkbox:
<%= check_box(:day, :monday, {:disabled => ''''} , (day.monday == true ?
{:checked => ''checked''} : {:checked => false} )) %>
It is disabled allright, but it is always uncecked. Is this supposed to
happen. It looks like
(day.monday == true ? {:checked => ''checked''} : {:checked => false} )
is not
2006 Jun 07
5
check_box:how to update 2 checkboxes dependent on each other
I''ve got the following problem,
I''ve created two check_boxes in my view. The user has to select one
check_box,
but isn''t allowed to seth both of them together on true. Now i am
looking for functionality that can help me doing the folling:
Scenario 1
CheckBox1 = True, The user sets CheckBox2 from False to True, now
CheckBox1 should automatically become False.