Displaying 7 results from an estimated 7 matches for "media_file".
Did you mean:
media_files
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
...del search?
# First Try. This syntax with using a hash to contain the include
params works with regular active_record calls.
@results = Inventory.find_with_ferret( @query,
{ :multi => [ Artist], :page => params[ :page ], :per_page
=> 10 },
{ :include => {:media_files => {}}, :conditions =>
[ "media_files.file and inventories.status = ''donated''" ] } )
# Resulting Error
undefined method `to_sym'' for [:media_files, {}]:Array
# Second try. I put the :include params in [] array brackets to see if
that would help...
2007 May 04
1
habtm and also has_many of the same things
Hi,
our app is a situation where users can upload files and also mark files
uploaded by other users as their favorites. So for the favorites we are
using a simple many-to-many with a tie table.
So in attempting that it looks like
class User < ActiveRecord::Base
has_and_belongs_to_many :media_file
has_many :media_file
end
class MediaFile < ActiveRecord::Base
has_and_belongs_to_many :user
belongs_to :user
end
but that won''t work because obv. if you call
current_user.media_file.find(:all)
there is no way to specify which association you are looking for. Or is
there?
if...
2018 Aug 08
0
[ANNOUNCE] igt-gpu-tools 1.23
A new intel-gpu-tools quarterly release is available with the
following changes:
General changes:
- Bumped used C standard to gnu11. (Lucas De Marchi)
- Bumped required meson version to 0.44. (Petri Latvala)
- Introduced meson options for explicit control over optional dependencies.
(Petri Latvala)
- Added a meson option to set runpath for the installed executables.
(Petri Latvala)
-
2012 Jan 27
2
to_json performance
...Hash with keys mapped, like so:
class Hash
def self.transpose(keys, values)
self[*keys.zip(values).flatten]
end
end
keys = %W{token artist album genre release_year title duration
duration_in_seconds position play_count favorited disc_number}
my_hash = @playlist.media_files.ordered.values_of(*keys).collect{ |
v| Hash.transpose(keys, v) }
Nice, now we have a Array of Hash without instantiating AR objects but
with all the info we need about our objects.
This operation proved to be _extremely_ fast even if we are
transforming and inserting 50k records.
Now, on to the...
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
2017 Oct 04
0
[ANNOUNCE] intel-gpu-tools 1.20
A new intel-gpu-tools quarterly release is available with the
following changes:
Library changes:
- Added helpers for launching external processes and capturing their
outputs. (Abdiel Janulgue)
- Increased max pipe count to 6 to support AMD GPUs. (Leo (Sunpeng) Li)
- Various improvements for Chamelium support. (Paul Kocialkowski)
- Added Coffeelake platform support. (Rodrigo Vivi, Anusha
2020 Mar 20
0
[ANNOUNCE] igt-gpu-tools 1.25
A new igt-gpu-tools release is available with the following changes:
- Meson build options have been renamed. Please check the news options in
meson_options.txt and make sure you don't get any warnings when configuring
the project. (Simon Ser)
- Compile-testing CI for MIPS. (Guillaume Tucker)
- Various igt_runner reliability improvements (Petri Latvala & Arkadiusz Hiler)
- Switched