similar to: Create my own dynamic "finder" method?

Displaying 20 results from an estimated 1000 matches similar to: "Create my own dynamic "finder" method?"

2008 Sep 23
0
Questions on Active Record SQL type Finders & Dynamic Finder
Hi, I understand there are total 11 types of key Options for finding a record. The all 11 valid keys for the options hash are :conditions, :include, :order, :select, :group, :joins, :from, :limit, :offset, :readonly, and :lock. We also have Dynamic Finders for the same. e.g. ... find_by etc... I would like to know, how many types of dynamic finders, Active Record provides, to match all those
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
Hello all, I just ran into something that I think is a bug, and I would like to confirm with the core team whether this is expected/desired behavior or if this is a bug that I should file and develop failing tests for (I doubt I have the active record method_missing fu to actually patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email
2006 May 31
6
habtm on an array (or object.habtm.habtm)
Hi, I have three Models: User, Group and File. User habtm groups and Group habtm Files How can I find all files that a particular user has access to? eg user.groups.files ? As user.groups returns an array, the above doesn''t work. Id like to find the files for all groups in that array, without adding any code to the User model. Thanks in advance PS I just posted this in the
2006 Jan 19
2
Easy way to handle form input without a model class?
I have a couple forms that I''d like to be able to validate and automatically populate, but it shouldn''t be based on AR. In fact I often have a bunch of small forms that I can''t really justify writing a whole new model class for anyway. I''d like to validate the form input, and then use rails helpers to automatically populate the form if validations fail.
2015 May 31
4
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
Hi everyone, I'm the developer of the Loci programming language ( http://loci-lang.org ), for which the compiler is a front-end for LLVM. I would like to say that LLVM has been extremely useful for the development of the compiler and so thank you everyone for building this amazing system. ---- Virtual Method Calls ---- While most aspects of the language map well onto LLVM IR, it seems
2006 Apr 13
2
Automatic finder
It looks rails automatically creates a "finder" method on models that have a "belongs_to". So I tried this in the console: c = Category.find(2) chunks = Chunk.find_by_category(c) chunks is always returned as an empty array. When I know have some chunks with a category_id of 2. Should the find_by_category do what I think it should be doing or am I completely off base?
2006 Jan 11
0
Issues with dynamic finders ruby-1.8.4 / rails-1.0.0
Hi all, I am not certain this is a 1.8.4 related issue, but I think it might be. I''m trying to use dynamic finders for my Category and Post models, such that a request /blog/categories/general would detect the slug and do a find_by_slug() instead of find(params[:id]). My have_slug?() method works fine, and the dynamic finders *were* working fine until I moved it off my local machine
2006 Aug 02
2
Hiding Model Attribute
I have a model object for which I would like to effectively hide one attribute (a password hash) so that it is never returned by a find_* call. I have tried several unsuccessful means. Is there a simple way to do this that I am overlooking? Thanks, Doug
2007 Oct 26
1
Spec custom finders
I have some finders in my models where I write some of the sql myself. I of course want to test these, but am not sure the best way. Should I just let them roll through to the db, and verify they return the correct objects based on the fixtures I load, or should I spec the actual query? I know that DB access is sort of frowned upon, but is this a situation where it is more or less acceptable? My
2009 May 19
0
Extending finders to include a session variable as an option??
We have a Page model which acts_as_paranoid. AAP modifies ActiveRecord finders to ignore any records marked as deleted unless the :with_deleted => true option is supplied. We have a UI element which allows users to toggle whether or not to display deleted Pages, their current setting being stored in a session variable, session[:show_deleted]. What we would like is to automagically have
2008 Feb 07
1
field names, aliases and finders.
I can not seem to make finders work with aliases. My goal is to map some fugly field names to nice field names and have the finders work with the nice field names. An example. class Users < ActiveRecord::Base alias :password :UserPWD end This doesn''t seem to work because obviously the object doesn''t have a method called UserPWD. What is the best way (short of a view) to
2015 Jun 17
0
macos finder error 36 when copy folder to samba 4.2.2
Am 17.06.2015 um 09:11 schrieb Sascha Kasch: > dear list, > > encountered a problem and hopefully someone more experienced might > help me. > problem is with macos 10.9.5 and finder. > > i want to copy a simple folder with subfolders and without any files > to my samba share. > files alone work flawlessly. > > when i drag a folder from desktop to the share the
2006 Apr 13
1
FerretHelper module and Ferret Finder utility
Hi I''ve written ferret_helper.rb (FerretHelper module) containing wrapper methods for converting PDF, HTML, Open Document and Microsoft Word files to plain text for the Ferret index analysers. To help test it I wrote a simple ff.rb (Ferret Finder) command-line utility to index and search document files. You can download the code at http://www.methods.co.nz/ff/ Cheers, Stuart --
2015 Jun 16
0
macos finder error 36 when copy folder to samba 4.2.2
dear list, encountered a problem and hopefully someone more experienced might help me. problem is with macos 10.9.5 and finder. i want to copy a simple folder with subfolders and without any files to my samba share. files work flawlessly. when i drag a folder from desktop to share the finder errors out with error -36 but creates all folders. same happens when i copy an empty folder from the
2015 Jun 18
0
macos finder error 36 when copy folder to samba 4.2.2
On Thu, Jun 18, 2015 at 09:51:28AM +0200, Sascha Kasch wrote: > Am 17.06.2015 um 14:39 schrieb Sascha Kasch: > >Am 17.06.2015 um 09:11 schrieb Sascha Kasch: > >>dear list, > >> > >>encountered a problem and hopefully someone more experienced might help > >>me. > >>problem is with macos 10.9.5 and finder. > >> > >>i want to
2006 Jan 20
1
Tiger 10.4.4 Finder hangs browsing over VPN
On Friday, 29 Jul 2005, Brian Daniels wrote under [Samba] Samba, VPN, and Mac OSX 10.4.2: > After upgrading to Tiger, [our Mac OS X systems] still work fine > when on our LAN. But if they try to connect to a [Samba 3.0.10-1] > share over the [IPsec] VPN, Finder hangs. The Mac logs the > following messages in /var/log/system.log during the hang: > > Jul 29 09:59:46
2006 Nov 06
2
Eager Finder SQL
Hi, I just uploaded a Rails plugin that allows you to specify custom SQL when doing a find with associations (AKA eager loading). One of the problems I encountered when implementing the Chacha Underground (http://underground.chacha.com) was being able to use queries provided by the DBA to efficiently get all the informaion I needed to render a page. In some cases, I needed to go two or three
2011 Feb 15
3
what is the best RPM finder?
thanks/ldv
2003 Feb 16
0
os X finder wonkiness
i would bet anything someone's already asked and had this answered, but since the archives of these listss aren't searchable, and since i couldn't find the info in the docs or elsewhere on net, here goes: i've got 3 shares active on a debian box, accessing them fine from an OS X g4 and 2 win 98 boxes (the were set up and configured via the samba web admin tool from a browser
2005 Mar 30
0
Mac OS X Finder hangs when accessing Samba server
Hello, I'm hoping someone may be able to steer me in the right direction, as I've searched the archives with no joy. Configuration: Server: Fedora FC3, kernel 2.6.9-1.667, samba-3.0.13-1 Client: Mac OS X Panther 10.3.8 The Samba server works fine with a Windows 2000 client on the same LAN. With Panther I am seeing the connection drop during transfers and/or the Finder freezing