similar to: Extend the find-method: more conditions

Displaying 20 results from an estimated 11000 matches similar to: "Extend the find-method: more conditions"

2007 Oct 18
9
with_scope issue
I have the following code: class User < ActiveRecord::Base has_many :requests do def find_active(options = {}) with_scope :find => { :conditions => ["requests.active = ?", true] } do find(:all, options) end end end end Executing user.requests.find_active results in the following SQL: SELECT * FROM requests WHERE (( requests.user_id = 10 ) AND (
2006 Aug 07
0
Overloading ''find''
How would I overload find? I got some excellent help on mixins for my classes using lib/, but it doesn''t allow find to be overloaded. I''m testing with the example method below: module myModule def find(*args) options = extract_options_from_args!(args) validate_find_options(options) set_readonly_option!(options) case args.first
2006 May 24
0
ActiveRecord::Base.sanitize_sql and SQL injection vulnerability.
Hi The PostgreSQL development group released an update[1] for PostgreSQL to address a SQL injection vulnerability. From the infromation[2] released with this update, it appears the vulnerability exists in other (all?) database systems allowing multi-byte encoding of requests. Of particular importance - since it relates not to database issues but to web programming practices - are these quotes
2006 Apr 04
5
How to implement tag clouds using plugin?
The code on http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code is based on the acts_as_taggable gem,anybody has done that using the acts_as_taggable plugin?thanks! btw:the code above uses the tag_count method,which is defined in the gem: def tags_count(options = {}) options = {:order => ''count DESC''}.merge(options)
2008 Mar 18
1
Polling is REALLY slow
I''m having some trouble with using brb for polling for work. Basically, what I want to do is update the state of a record and have brb notice and start a process. I do not want to call ask_work for each process because there may be several places where the object''s state is changed, and I only want to process once. Plus, I can schedule things better this way. My first thought
2006 Mar 21
2
SQL bug in acts_as_taggable
Hi, excuse me if this is off-topic and feel free to ingore it in case. I''m using acts_as_taggable (the gem version) and found what to me looks like a bug in this code from the method tags_count: sql = "SELECT #{t}.#{t_pk} AS id, #{t}.name AS name, COUNT (*) AS count FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk} AND #{jt}.#{o_fk} =
2015 Jul 06
2
libopus and TI am335x with linphone
Hello, has anyone running a linphone-application on am335x (like beaglebone) with opus codec. My CPU has extreme high load, wenn ist start with opus codec. Is there a possibikity tu optimize f?r this single core ARM? Thanks Helmut Sholz ______________________________ BAYERISCHER RUNDFUNK Rundfunkplatz 1 80335 M?nchen HA IT und Medientechnik Abteilung Systemservice Funkhaus FG Sendungssysteme
2006 Jun 30
0
find_by_sql not quoting properly (in acts_as_taggable plugin)
I have run into a very strange problem discovered through the use of the acts_as_taggable plugin, but related to quoting/sanitizing the interpolated list in a find_by_sql. Apologies for the length, but I wanted to be complete. ;-) The method from acts_as_taggable.rb is: def find_tagged_with(list) find_by_sql(["SELECT #{table_name}.* FROM #{table_name}, tags,
2006 Jan 10
0
Day.find_all_with_appointments - INNER JOIN
Hi list, Is there a better/simpler way to code an inner join, than the 4 lines below: class Day < Foo def self.find_all_with_appointments (*args) find :all, { :select => ''distinct foos.*'', :joins => ''INNER JOIN appointments ON days.appointment_id = foos.id'' }.merge
2008 Mar 14
2
MySQL IN clause for an array of strings
I''m trying (for the first time) to build an IN clause from an array of strings and getting an error using MySQL as the DB... Here''s the code I''m using to build the clause: zips_clause = '''' user.get_zipcodes.each {|z| zips_clause += '','' if !zips_clause.blank? zips_clause += ''\'''' + z +
2016 Apr 19
3
mount cifs
On 04/19/2016 1:44 PM, Helmut Hullen wrote: > Hallo, Dale, > > Du meintest am 19.04.16: > >>> Found some more info: >>> >>> mount.cifs to mount shares from my DCs (samba 4.2.11) works >>> mount.cifs to mount shares from smbserver (also 4.2.11) does NOT >>> work. > [...] > >>> As for smb.conf options: similar on the DCs and the
2013 Jun 27
3
Syslinux 6.00 released
Hi, I have the same problem as Helmut with INCLUDE keyword and extlinux 5.10 an later. The following configuration has been tested and worked with extlinux 4.05, 4.06, 5.01 Contents of "boot_label" file DEFAULT 1 --------------------------------------- Contents of "extlinux.conf" file # Enable menu.c32 UI menu.c32 # Disable the boot: prompt PROMPT 0 # 5 sec TIMEOUT 50 #
2016 Apr 19
2
Best Pratice for installing samba package in production environment
Hi Helmut, Thank you for your mail. The distribution is Debian linux 7.9. I am talking of a fresh installation, and of course of it's update after. Thank you for helping. Regards Le 19 avr. 2016 06:08, "Helmut Hullen" <Hullen at t-online.de> a écrit : > Hallo, Jules, > > Du meintest am 18.04.16: > > > Is it recommended to install the tarball or archive
2015 Jul 06
0
libopus and TI am335x with linphone
Hello, you can compile opus with "--enable-fixed-point". That saves a cpu ressources. https://github.com/Studio -Link/PKGBUILDs_clean/blob/master/opus/PKGBUILD#L23 -- nice regards, Sebastian Reimers ------------------------------------------ IT-Service Sebastian Reimers Am blanken Boom 14 32369 Rahden Festnetz: 05776-3930000 Fax-Nummer: 05221-17242088 Skype: miete-admin E-Mail:
2019 Feb 07
0
persistent generic device for tape changer
I've taken you as far as I can go. ?Now you will have to experiment a bit for your use case. ?I should point out that at least in my system, the link with the serial number in it shows up even with the line commented in the rules file. As always, YMMV. On Thu, 2019-02-07 at 22:29 +0100, Helmut Drodofsky wrote: > Hello Ron, > > sounds good. I have 2 tape changer. I persume, udev
2019 Feb 07
2
persistent generic device for tape changer
Hello Ron, sounds good. I have 2 tape changer. I persume, udev creates the same link for both. Can I modify SYMLINK+="changer-$env{ID_SERIAL}" The serial should be unique. Viele Gr??e Helmut Drodofsky Internet XS Service GmbH He?br?hlstra?e 15 70565 Stuttgart Gesch?ftsf?hrung Helmut Drodofsky HRB 21091 Stuttgart USt.ID: DE190582774 Fon: 0711 781941 0 <tel:+497117819410> Fax:
2016 May 04
1
Windows 10 compatibility?
Helmut, Thanks. Yes, the Windows 7 clients are able to connect, and we don't have any 8/8.1 clients. Regards, Steve -----Original Message----- From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Helmut Hullen Sent: Wednesday, May 04, 2016 11:17 AM To: samba at lists.samba.org Subject: Re: [Samba] Windows 10 compatibility? Hallo, Harkins,, Du meintest am 04.05.16: >
2015 Jun 30
1
Samba 3.6 security fixes
Thank you for the responses! Hi Helmut, I actually prefer moving into a newer version that has all the great new features, but due to policies inside our firm it will be a long process. I find the idea of modifying the new version Samba to start up like the old version. Very crafty! :) Hi Volker, yes we do have a support contract with Red Hat and Oracle. The version we are currently using is
2015 Dec 07
2
openvpn + routing
Helmut Drodofsky wrote: > Hello, > > there is one route missing: > > 128.0.0.0/1. > Did you mean 127.0.0.0? mark > config client: > route-nopull > redirect-gateway def1 bypass-dhcp > > best regards > Helmut > > Viele Gr??e > Helmut Drodofsky > > Internet XS Service GmbH > He?br?hlstra?e 15 > 70565 Stuttgart > > Gesch?ftsf?hrung
2013 Jun 26
1
How to find Syslinux version
> Hallo, Ady, > > Du meintest am 26.06.13: > > >>> By the way: what about an option "-v" or "--version"? > >>> > >>> It's a bit nasty to find the version of syslinux or pxelinux with > >>> an editor or so ... > > >> [matt at mfleming-mobl1 syslinux]$ cat version > >> 5.11 2013 > >