similar to: multi-state check boxes

Displaying 20 results from an estimated 20000 matches similar to: "multi-state check boxes"

2006 Aug 07
1
Eager loading wierdness
Consider this problem. I have an Item that has_many Features I want to find all Items with a Feature name of ''foo''. Normally you would do this.. @items = Item.find(:all, :conditions=>["features.name = ?", ''foo''], :include=>:features) This all works fine and dandy except for this problem. If you do this... <% for item in @items %>
2006 Aug 02
5
Fun with ez_where
I''ve been trying to use the ez_where plugin to create a dynamic finder. The structure looks somehing like this.. === controller === def list attribute_filter = params[:filter] @filter = Caboose::EZ::Condition.new :table do attribute <=> attribute_filter if attribute_filter end # ... do the find with the @filter # end === view === .... <%= link_to
2006 Jun 02
2
Group checkbox toggling
This isn''t really a scriptaculous question, but it might be interesting anyway. I''m generating a rails app and in one form I have a grid of check-boxes (rows = A..H and col=1..12). I would like to put a checkbox in the column/row headers to toggle the boxes in a particular row or column. Each box has a name like ''position_A1'' or
2006 Jul 17
3
Best practices - field initialization based on display rules
All, I have a form with the following field interaction rules. Given checkbox A, text field B text field C If checkbox A is checked then make text field C equal to the value of text field B and disable field C. If checkbox A is unchecked then enable field C. In order to display a form where I''m manipulating an already existing object, I have something like this in my RHTML template
2006 May 24
0
polymorphic url and polymorphic partial helpers
Here are a couple of articles I wrote describing a couple of handy helpers for dealing with polymorphic objects. These helpers allow you to generate urls and render partials on objects without knowing what class they are ahead of time. http://www.sciwerks.com/blog/2006/05/24/polymorphic-urls/ http://www.sciwerks.com/blog/2006/05/24/polymorphic-partials/ Hopefully you will find them useful.
2006 Feb 21
4
Multi-page forms
I''m curious to see how others are dealing with the construction of multi-page forms. I can see a couple of ways to do this, each with their own advantages/disadvantates. Approach 1: * define one table with columns for each form entry. * define a method/view for each page, which only displays a subset of the fields. * submitting a page saves the data and moves on to the next page.
2006 Jun 12
0
Rails Testing Strategies
As part of an application I am developing, I have been delving into the dark art of Rails testing. Since the existing literature on the topic is a bit sparse, I have written up a couple of brief articles on testing strategies for rails. The first one is on the usefulness of ''Positive and Negative Controls'', and the other is a simple way to make sure you are working with
2006 Jul 15
12
Safe way to destroy records
Hello, how can I check if a destroy was successful? Is the object only frozen if deleted or do I have to do an additional find to see if there is a record left? What happens if an after_destroy callback returns false? Is there always a rollback? Markus
2006 May 24
3
using a helper from the console
I''ve got a couple of helper functions in my application_helper file that I would like to run from the console (for debugging). What is the correct way to invoke a helper from the console? _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Mar 09
4
Testing Migrations
Is there some standard way to test migrations? It seems to me that an additional safeguard for migrations would be to test and see if applying the migrations to the test database allows one to reconstruct the structure of the development database. If you can''t, then there is an error in your migrations, most likely because someone hand-modified the database without generating a
2006 Jul 07
3
dynamically updating a listbox from another listbox
Hi, I would like to be able to dynamically (without reloading the page) change the values from one listbox when a user select items from another listbox. I have a model ''Sector'' which has_many ''levels'' (and of cours, ''Level'' beyong_to ''sector''). I want to show the user two listboxes with the sectors and levels. But
2006 Feb 08
3
RJS templates before, during and after
RJS templates are nifty. They let you put all sorts of fun effects all over your bland html pages without too much work. The link_to_remote function also lets you run scripts before, during, and after an AJAX call is run by using callbacks. There does not seem to be an equivalent method for running an RJS template before or during an action. Rendering it at the end is no problem. One
2006 Jul 15
13
Active Record: Can it auto-create database tables for you?
Hi, Just get started with Rails and I''m trying to read ahead and find out whether Active Record supports auto-creation of database tables for you? Is this supported, or is the concept that you write your own database DDL to do this? Thanks -- Posted via http://www.ruby-forum.com/.
2006 May 04
12
RJSCallback 0.1
Announcing RJSCallback 0.1 The RJS Callback plugin is being developed to provide Ruby On Rails with the ability to easily call RJS templates for the various callbacks associated with AJAX function calls (e.g., :before, :loading, :complete). Currently this plugin automatically detects, loads, and renders RJS templates with specific names and inserts them in the appropriate spot in
2006 Jul 26
4
Dropdown with concatenated columns.
What is the best way to create a drop down where the viewable text in a concatenation of 2 or more columns? For instance, I hane a lookup table with these columns. Model FOO columns: id , name, phone In my drop select tag, I''d like the user to see: "name1 phone1" "name2 phone2" etc.. I know I can do this using find_by_sql . .. But, isn''t there a more
2006 Jul 20
9
Including children''s children?
a has many b''s b has many c''s results = A.find params[:id], :include => :b How do you also make sure the b''s include the c''s? Thanks for your help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Jan 15
4
HABTM and Check Boxes (Yet Another thread on this)....
Hi there, it''s an afternoon that i''m destroying my head on this, and i''ve decided to ask to you all . I''ve got to do some check box lists for a modified substruct version i''m doing, right now, i''m interested to insert a list of categories of interests into a customer sheet i''m using the substruct plugin version, wich stays in the
2006 May 21
2
acts_as_taggable and single table inheritance
I''ve set up a couple of STI models like such that we get something like this... class A < AR:Base class B < A acts_as_taggable class C < A acst_as_taggable (using the acts_as_taggable plugin) I can tag things just fine this way, the problem I encounter is that the taggings are listed with the base class ("A") and not the appropriate subclass ("B"
2007 May 25
3
check box value in array
Hi guys, I have a group of check box in rails page. check box Code as below: <% for count in @total_cellno %> <input name="checkbox" type="checkbox" value="<%= count %>" /> <% end %> I want to receive the selected value in my controller model. @selected_box << params["checkbox"] I guess that it provides values
2006 Aug 02
4
Search function in this Forum ??
This forum has been a great resource for me. It would be great if i can search the forum before posting any question, as i''m sure someone has already posted that question before. The search function has been disabled for quite sometime now. I''ve already emailed the administrator but haven''t got any response. any idea on when this would be enabled ? Thanks, VASU.