Displaying 20 results from an estimated 300 matches similar to: "find_by_ issue"
2013 May 28
3
AR's find_by_* limits return results. How to avoid id?
When I use find_by_name method I get LIMIT 1 result.
> SELECT "users".* FROM "users" WHERE "users"."age" = 25 LIMIT 1
But the "age" column is not unique in my table and its value may repeat.
So I expect that an array of records where "age" is 25 will be returned.
But AR limits the query by 1.
How to avoid it? Or is it the default
2008 May 22
9
Retrieving Mutliple Records using find_by_*
I was hoping that AR''s find_by_* magic methods would help me retrieve
multiple items somewhat like the following:
names_to_find = [''Larry'', ''Moe'', ''Curly'']
found_people = Person.find_by_name(names_to_find)
Is there a way to accomplish this using find_by_* (or even find(:all)
using some sort of conditions) or must I resort to SQL
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
2008 Mar 04
6
find_all_by deprecated?
Is find_all_by deprecated and/or find_first_by for 2.0.2? If not,
what is actually deprecated? just find_all(..) and find_first()?
Thanks for clearing this up.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2014 Nov 10
0
Boot fails in a VMware player VM - syslinux 6.03
Hi,
i downloaded
http://slint.fr/misc/testing/slint64-14.1_syslinux.6.03.iso
Inspection by xorriso-1.3.8:
xorriso -indev slint64-14.1_syslinux.6.03.iso \
-report_el_torito plain \
-report_system_area plain
yields
El Torito catalog : 46 1
El Torito cat path : /isolinux/isolinux.boot
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El
2014 Jul 30
2
isohybrid: slint64-14.1.iso: unable to find mac efi image
Hi,
On 29/07/2014 23:19, Thomas Schmitt wrote:
> A good opportunity to brag with xorriso's boot inspection
> features (since xorriso-1.3.8):
Yes! I've upgraded libburn, libisofs and libisoburn so now I can play
with it too ;)
> I forgot to advise (or misadvise) -isohybrid-apm-hfsplus with
> the image /isolinux/efiboot.img . So we only got one APM
> partition here. A
2006 Aug 16
4
Undefined method - what undefined method
I am doing a typical database list, but when I do
<% for m in @private_messages %> (Line 28) It tells me that the method
''each'' is undefined. What''s wrong, I did not call the method each....
Here''s the error:
Showing app/views/account/mail.rhtml where line #28 raised:
undefined method `each? for #<PrivateMessage:0x408bb830>
Extracted source
2006 Jul 11
6
@record.each do |record|
I''m trying to ''destroy'' a particular record of a table
>From the controller side, i''ve found a list of possible records that i
want deleted.
ie. @chart = Chart.find(:all, :conditions => ["record_id = ?",
param[''id''] ]
''id'' is passed into the controller and @chart is all the possible
records that have
2005 Mar 05
9
Best practice to manage ''id'' hacking?
In my app, a user logs in [via the login generator] and has access to
details of his account, and transactions attached to his account.
This is achieved in the standard rail manner by passing the account id
or transaction id between the controller and the view.
But what is to stop someone hacking the URL or view html to access
another account id or transaction id ?
eg /account/show/46 becomes
2006 Jan 12
1
Form Entity Names for Child Objects
In my controller, I do this to instantiate and populate my Part,
PartName and PartNumber objects.
def edit
@part = Part.find(params[:id], :include => [:part_name, :part_number])
end
But in the view, this doesn''t refer to the right object. I somehow
need to indicate that the part_name object is a child of the part
object.
<%= text_field_with_auto_complete :part_name,
2014 May 12
1
[PATCH] isohybrid: fix overflow on 32 bit system
Hi,
hpa:
> The right thing to do is compile it with #define _FILE_OFFSET_BITS 64
> and change fseek to fseeko with the appropriate type being off_t.
And for GPT names it should really use 16-bit UTF-16LE characters
and not 8-bit characters padded up by the same number of
random bytes from the program memory.
See e.g.:
2014 Jul 29
0
isohybrid: slint64-14.1.iso: unable to find mac efi image
Hi,
Didier Spaier:
> I uploaded both ISO images on http://slint.fr/misc/MacBoot
A good opportunity to brag with xorriso's boot inspection
features (since xorriso-1.3.8):
xorriso -indev slint64-14.1-Thomas_mkisofs.iso \
-report_el_torito plain \
-report_system_area plain
yields (block size is 2048):
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz
2006 Jan 11
0
Easy Question, I Think
I am just getting started with Rails, don''t know any Ruby, and don''t
quite even get object oriented programming yet. I have tweaked my
schema to The Rails Way and have generated a bit of scaffolding.
I am trying to create a new Part, which references a PartName and a
PartNumber. I can create a PartNumber on the fly, but the PartName
has to exist. I have an inelegant solution
2011 Sep 22
2
find_by_email dynamic method returning new
Hello everyone,
I have a rails app which uses email as login name. At some point, I
have to search the user, in the User model by email. For some reason,
the method User.find_by_email(email) returns nil, even though the user
is in the database.
The same applies for any find_by_* method that searches by any
database column. I was able to find the user using the User.find
Does anyone have an idea
2006 Jan 12
0
Easy Question, I Think [re-post, sorry if dupe]
I am just getting started with Rails, don''t know any Ruby, and don''t
quite even get object oriented programming yet. I have tweaked my
schema to The Rails Way and have generated a bit of scaffolding.
I am trying to create a new Part, which references a PartName and a
PartNumber. I can create a PartNumber on the fly, but the PartName
has to exist. I have an inelegant solution
2007 Mar 27
6
how does rails do this "find_by_?"
Hello there,
I''m wondering how do they create functions on the fly?
find_by_any_column_name ??
I want to do something similar with my models, but I don''t really know
how to do it?
user_current_nickname
user_current_id
user_current_role
etc.?
Regards,
Jamal
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this
2016 Feb 22
1
How to understand partition table on hybrid ISO image?
Hi,
if I inspect an hybrid ISO with tools like fdisk and gdisk, then looks
like hybrid ISO has both the MBR and GPT in order to support both the
BIOS and UEFI:
# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present
Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT
2014 Nov 10
1
Boot fails in a VMware player VM - syslinux 6.03
On 10/11/2014 10:46, Thomas Schmitt wrote:
> Hi,
>
> i downloaded
> http://slint.fr/misc/testing/slint64-14.1_syslinux.6.03.iso
>
> Inspection by xorriso-1.3.8:
>
> xorriso -indev slint64-14.1_syslinux.6.03.iso \
> -report_el_torito plain \
> -report_system_area plain
>
> yields
>
> El Torito catalog : 46 1
>
2014 Jul 29
2
isohybrid: slint64-14.1.iso: unable to find mac efi image
Hi,
On 29/07/2014 21:34, Thomas Schmitt wrote:
> Nevertheless i advise Didier to simply try with 0xef rather than Mac.
At least the ISO will then have MBR, GPT and APM entries for the file
macboot.img.
I did that, and also tried the xorriso command you posted.
I uploaded both ISO images on http://slint.fr/misc/MacBoot resp. renamed:
slint64-14.1-Thomas_mkisofs.iso
2016 Apr 02
2
Changes to get CD to boot on EFI System.
Hi,
Didier Spaier wrote:
> http://slint.fr/testing/slint64-14.1_syslinux.6.03/slint64-14.1_syslinux.6.03.img
This looks like the content of an EFI system partition.
Exactly what i need for experiments. Thanks a lot.
(slint64-current-goofiboot.iso and slint64-current-efi-stub.iso
were already in my collection.)
It boots to "Slint installer for Slackware64-14.1" by: