Displaying 20 results from an estimated 800 matches similar to: "habtm and also has_many of the same things"
2010 Dec 27
1
another superscript problem
I've exceeded the maximum time I am willing to accept for solving simple
problems so I thank all in advance for your assistance.
I am trying to plot text combined with an object value and a superscript.
obv = 5
text = "Population mean ="
ss = ^o # degrees
Something like this (very naive so you get the idea):
expression(text, obv, ss)
paste(text, obv) # works ...but of course I
2006 Dec 07
5
Search Multiple Models
Hello folks,
I have four models, each with their own separate index.
Models = Articles, Blogs, MusicTracks, and MediaFiles
I have individual searches within each section of the site working just
fine, but I want to have a gloabl search that searches across all of
them at the same time and returns the results ordered by score.
Here''s how far I am now...
def search
query =
2007 Jul 14
1
How to remove the quote "" in the data frame?
If I do not add "ress" into the data frame "res", there is no quote in the
data frame. However, I add "ress", all column were found the quote.
How to remove it?
If you can delete the quote in the file "ress", that is better.
Thanks.
> ress[1:10]
[1] "ABHO.ABNE" "ABHO.ACBA" "ABHO.ACGI" "ABHO.ACKO"
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
Hello, I''m using find_with_ferret to search multiple models and it
works great. The trouble is I need to filter the results
using :include and :conditions.
I get two errors depending on the syntax I use in the search. Reading
the source, I see the retrieve_records method seems to filter
the :include and :conditions so that they only apply to the relevant
model when searching
2004 Nov 19
18
SingleTableInheritance Considered Harmful
Here''s the text of a quick note I''ve added to the Inheritance wiki page.
I''m actually proposing that it would be a good idea to drop automatic
single table inheritance and force people to declare it explicitly.
There are two reasons for this:
1. Implicitly doing it unnecessarially limits your use of
inheritance where you really need it: in your object-oriented
2007 Apr 30
1
collection_select - prepending a "any" option
Say I have a normal <SELECT> tag being generated thusly:
<%= collection_select :task, :id, Task.find(:all), :id, :name %>
what is the easiest way to add a "ANY" option to the top of the option
list? I know Task.find(:all) returns a collection object, so is there
a unshift() for that?
well OK I tried:
Task.find(:all).unshift([:id=>0,
2007 Oct 03
2
Providing HTML in an error message generated by validation
All,
I have some validation that I''m doing in a model.
As part of the error message, I would like to provide an HTML link.
What is the best approach to handling this?
APPROACH 1: One way is to
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
in my model so that I can use link_to to generate my link (obv. I could
hard code HTML as well).
But anyway that
2007 May 30
3
how to create a simple DHTML dialog
I am looking to create a simple dialog window like this on a page:
http://developer.yahoo.com/yui/examples/container/simpledialog/2.html
I know scriptaculous comes with Rails, not YUI, but I can''t find
anything similar there. Is there any shortcut to doing this with
existing plugins or core stuff?, or must I download another toolkit?
thanks
Sam
2012 Jan 27
2
to_json performance
Originally posted on github, reported to the right place.
I would like to open a discussion about how `to_json` and `as_json`
operates in Rails from a performance standpoint.
I''m using Rails 3.2 but this issue applies to almost all versions of
Rails.
Our use case presents the challenge in sending out potentially large
JSON (or XML, but we''ll focus on JSON rendering here)
2007 Feb 16
0
Mongrel upload progress and models with other fields
I''m trying to set up a system that will allow users to upload files
using the mongrel upload progress gem to a model that includes other
information.
While I''m willing to hack around with this myself for a while to get
it working, I was hoping that someone had done this before and might
be able to give me some hints/code to look at.
My mediafile has a description, mediatype,
2007 Sep 04
2
backgroundrb install issue
I installed backgroundrb v0.2.1 via svn external per the README. But
when I go to start ''er up I get:
$ ./script/backgroundrb start
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'': no such file to load -- daemons (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from
2009 Dec 03
1
[Bug 1680] New: Match User/Group with no affirmative match does not work as expected
https://bugzilla.mindrot.org/show_bug.cgi?id=1680
Summary: Match User/Group with no affirmative match does not
work as expected
Product: Portable OpenSSH
Version: 5.3p1
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: ssh
AssignedTo:
2009 Jun 12
4
Wine just changes screen resolution.
I'm quite new to Ubuntu and so to Wine too. So I installed Oblivion using Wine, and everything went well. But when I tried to run the game, nothing else happened but the screen resolution changed to 640x480. That happened when I clicked "Launch Game" on the start up menu of the game. Should I change some conffigurations or something?
2014 Jan 04
1
Writing an FTS plugin
Hi, I'm having some trouble writing an FTS plugin that uses notmuch
(http://notmuchmail.org/) as the backend.
As a proof of concept, I'm adding a hardcoded UID to the search results in
the plugin's lookup handler:
seq_range_array_add(&result->definite_uids, 1, 42);
but this UID is never returned by IMAP SEARCH commands. I know the plugin is
being used, since I'm also
2005 Feb 26
0
Wildcard failing to load on asterisk@home
I have a E110P which I can't seem to make function and i think it has
something to do with interrupts, but I've never had to deal with them
before and was wondering if someone could offer some guidance.
a modprope zaptel loads fine.
when i then do
modprobe wcte11xp
i get the following:
/lib/modules/2.4.21-27.0.1.EL/misc/wcte11xp.o: init_module: No such device
Hint: insmod errors can be
2011 May 30
1
Fwd: Re: Fwd: cgroup OOM killer loop causes system to lockup (possible fix included) - now pinpointed to openssh-server
Just did some testing..
root at vicky:~# cat /var/log/auth.log | grep "Set"
May 30 21:41:05 vicky sshd[1568]: Set /proc/self/oom_adj from -17 to -17
May 30 21:41:07 vicky sshd[1574]: Set /proc/self/oom_adj to -17
root at vicky:~# ps faux | grep 1574
root 1574 0.0 0.0 70488 3404 ? Ss 21:41 0:00 \_
sshd: root at pts/1
root at vicky:~# ps faux | grep
2007 Oct 24
2
MediaCtrl?
Hi.
First of all, thank you for your hard work - wxRuby (with wxSugar) is a
wonderful tool! I have been playing with it on and off for a year or so for
toy projects and really like it!
I need to play mediafiles (mostly mp3s) from within an application. In
wxwidgets (the c++) I can use wxMediaCtrl. As I understand it this class is
not implemented in wxRuby - right?
Is there a reason for this - is
2008 May 31
4
drbd strategy
I have an existing in-production LAMP server running Centos 5.1. It uses
physical partitions on top of hardware RAID1, having / /home /var and /boot
on separate partitions.
We have a near-identical system I am thinking of bringing in as a
DRBD/Heartbeat companion. One solution may be to use csync2
[http://oss.linbit.com/csync2/] on /etc and /usr/local (the only areas that
will differ from
2008 Oct 15
3
firefox is incredibly unstable
does anyone else have major probs with Firefox as installed on CentOS5?
ever since the RPM for FF3 came out it has been crashing daily. Usually when I
use Save As... or Browse... or anything else that brings up the Gnome file
picker. After the crash I re-start then the file picker works for a while.
Sometimes it just takes scrolling or click+drag an image or some other random
action. BANG
2015 Aug 12
0
Help viewer issues
Hi.
Does anyone else have issues with the GNOME help viewer on CentOS 6? I think it mostly worked a while back, but after some recent update or the other, I have problems like:
1. Nothing happens when I click "Desktop User Guide" or "GNOME Desktop Accessibility Guide" or "GNOME Desktop System Administration Guide" on the "Help Topics" page.
2. If I