Displaying 20 results from an estimated 3000 matches similar to: "HABTM Movable Select Box"
2006 Aug 08
2
Javascript - multiple select selectboxes
I am trying to populate a multiple select box using javascript, but am
having problems with the name. When I change the name to "codes[]" I
can''t get the javascript to find the form element, but without the [] on
the end, rails wont read all of the selected values.
Here is an example of the javascript working, but when you submit the
array is not passed across for the codes.
2007 Jan 09
6
rcov seg fault
Hi
Trying to get rcov going (has been working), but with the following context
and specs it fails.
context ''/account POST with invalid attendee'' do
controller_name :account
setup do
Attendee.stub!(:create!).and_raise(ActiveRecord::RecordInvalid.new(
Attendee.new))
end
specify ''should raise on create'' do
Attendee.should_receive(:create!).with({
2010 Aug 18
2
RSpec 2/Rails 3 - content_for in view specs
My main layout includes separate content_for/yield sections for my header,
sidebar, footer, and content. However, when running a view spec, the
`rendered` variable seems to only contain a string of just the primary
content and ignores the header/footer/sidebar as well as the rest of my
layout file (the "render" call just returns my primary content wrapped in
generic <html> and
2005 Jun 29
14
Unobtrusive scripting?
Currently, pages generated by Rails tend to be sprinkled with
JavaScript. This happens, because the various helper methods work only
locally and simply append to the output.
In order to hide the JavaScript away, rendering would probably have to
be changed. A way I can think of is that a page-specific script is
included in the head of the document and JavaScript code is not written
to the
2006 Nov 22
3
Controller Isolation
Hi,
I have a project that I had running under rspec 0.6.x and recently upgraded
to 0.7.2.
I am trying to isolate my controllers from the database as I go through and
change all the specs to run under 0.7.2.
I am having a problem where I need to make the create! method return the
mocked object as well as raise RecordInvalid exception. Is this at all
possible?
I use the rescue statement in my
2007 Jan 11
2
In-place editor for a whole form?
I want to implement in-place editing for a hierarchical structure where
the nodes are not simple text fields, but need to be represented by at
least two input elements.
The Rails helpers only support in-place editing for a text field,
scriptaculous''s controls.js beyond that implements support for an
in-place editor containing a select element. I need an editor where I
essentially
2005 Jul 06
16
Autocompletion not working in Konqueror
I''ve just had a look again at the autocompletion demo that Thomas put up
at
http://script.aculo.us/demos/ajax/autocompleter
Unfortunately, in Konqueror (3.4.1) it doesn''t work at all. Not even an
error is triggered. It does work nicely in Firefox. How about Safari?
I don''t have the time right now to track this down systematically (maybe
latter), but just from
2006 Jan 13
2
Select multiple question
I''ve got the following code in my view:
<select name="user[member_list][]" multiple="multiple">
<%= options_from_collection_for_select @someUsers, "id", "username" %>
</select>
I have a few other fields, textboxes, etc. within the form. When I go
to save the info, the textboxes all save with their content, but the
select box
2003 Oct 28
9
Using memdisk to remotely flash BIOS
I am using memdisk to remotely flash the BIOS and other firmware. It works well
for most flash programs. After the flash I need to initialize the NIC to send a
signal to my management server that the flash is complete.
I am curious as to how others have solved this problem.
Thanks.
2005 May 17
2
Noob - ActionView::Helpers::FormOptionsHelper::select
Hi,
I''m just starting with Rails and i''m trying to do something like this:
<%= start_form_tag :action => ''add_user'', :id => @social_event_group %>
<%= select ''user'', ''id'' , User.find_all.collect {|u| [ u.login, u.id ]
}%></p>
<%= submit_tag "Add User" %>
<%= end_form_tag %>
2004 Sep 24
5
using tcltk in R under ESS/XEmacs on Windows
Sorry for the cross-post. Not sure where the problem is...
A while back I posted an R function to R-help:
cd <- function (dir = tclvalue(tkchooseDirectory()), saveOld = FALSE,
loadNew = TRUE) {
stopifnot(require(tcltk))
if (saveOld)
save.image(compress = TRUE)
setwd(dir)
rm(list = ls(all = TRUE, envir = .GlobalEnv), envir = .GlobalEnv)
if (loadNew &&
2005 Jun 30
6
McAfee 8 incompatible with Samba
I've parsed a whole year's worth of postings in this group
and didn't find any previous reference to the problem.
Since I've updated McAfee to version 8 many applications
which open file chooser dialogs report "Access denied"
when trying to open a Samba share, including the users's
own home directory.
At installation one can choose to exclude some apps from
the
2009 Apr 19
19
Controller spec: testing that scope is set
In a Rails controller I set the scope on a model class in an around
filter. I have defined expectations on the model classes, and ideally, I
would add a further expectation for the scope. Is this already possible
in some way? How would I go about adding support a scope expectation?
Michael
--
Michael Schuerig
mailto:michael at schuerig.de
http://www.schuerig.de/michael/
2005 Aug 22
8
Observing changes to a text field
I''ve noticed that using several TimedObservers (prototype.js) on a page
to watch for changes to text fields (haven''t tried forms) can have a
non-negligible effect on the CPU cycles used by the browser process.
Nothing dramatic, to be sure, but unnecessary.
Autocompleter.Base (controls.js) follows a smarter strategy to watch for
changes. Currently this functionality is tied
2005 Aug 13
4
Timing out ajax requests?
Has someone come up with a generic way to handle ajax requests that
exceed a certain time?
In my concrete case, I have several select boxes for drilling down a
hierarchy. When the user clicks an option, the next deeper level is
retrieved. To avoid multiple concurrent requests, I disable the select
box. As the request may take too long or cause an error, I set a
timeout that re-enables the
2004 Sep 10
2
rpms
--- Miles Egan <miles@caddr.com> wrote:
> Are there rpms for flac available?
I'm not aware of any official maintainers but supposedly
the gstreamer guys (http://gstreamer.sf.net) have a spec
file for it. I am going to look into it in the next
couple of days but when 1.0 comes out I'm sure RPMs will
pop up pretty quickly.
Josh
__________________________________________________
2006 Jul 27
9
Introspecting validates_presence_of
Hello people,
I''d like to detect whether an attribute of a model has
vaildates_presence_of applied to it so I can automatically apply a
mandatory (*) to the field...it doesn''t look easy...any ideas?
Cheers,
--
Dan Webb
http://www.danwebb.net
2005 Jun 29
2
Unit testing
Recently, I''ve started to write unit tests for some of my scripts. In
general,it''s no worse in JavaScript than in Ruby or Java. I didn''t have
the courage to try Selenium, but had a look at JsUnit. Unfortunately,
in Konqueror it produces unfathomable errors and in Firefox it is slow
beyond imagination.
Anyway, writing tests for functions that are computational or
2005 Sep 06
4
url_for: :overwrite_params went missing
Somewhere between 0.13.1 and the current SVN version
the :overwrite_params option to url_for (and related methods) went
missing. I can''t tell whether this was deliberate or by mistake, and I
have no idea how to get the same functionality in some other way
either.
Michael
--
Michael Schuerig Life is what happens
2006 Aug 08
7
Useful plugins for RadRails
Hi Friends,
Could anybody suggest me some nice and useful plugins for RadRails! It would
be very great if we make list of all such plugins!
1)________
2)________
3)________
4)________
5)________
6)________
7).....
Please fill above blanks and lets make a big list of it!
--
Don''t live to geek; geek to live.
http://anilw.info
-------------- next part --------------
An HTML attachment