Displaying 20 results from an estimated 2000 matches similar to: "Prevent indexing depending on variable"
2007 Sep 12
3
Can''t disable ferret when running in Mongrel
In my environment.rb I say the following:
MyModel.disable_ferret
puts MyModel.ferret_enabled?
The console works as expected:
script/console
false
>> MyModel.ferret_enabled?
=> false
I can then edit an instance, ferret remains disabled and the changes
are not immediately indexed.
However, when I start mongrel Ferret is initially disabled, but then
somehow becomes enabled again
2007 Sep 08
8
SVN and Rails problem
Hi guys,
I''ve finally managed to get my server up and running with
mongrel_cluster and all that jazz. My rails app works fine, but when I
try to access my svn repos as I was doing before everything was setup
rail is giving me a 404.
What can I add to my httpd.conf to prevent this? Here''s a snip from my
httpd.conf relating to the domain:
---HTTPD.CONF---------------------------
2008 Jan 10
2
Error on manual indexing
I''m having some problems with getting the drb server to work correctly
on my production server. As a workaround I tried disabling automatic
indexing and have a cron job manually update the index every hour or so.
I disabled the automatic indexing with:
def ferret_enabled?
false
end
But whenever I try Page.rebuild_index
I get a ''wrong number of arguments''
2007 Apr 08
13
attachment_fu thumbnail not created
I followed the instructions on Mike Clark''s weblog and everything
works perfectly except the thumbnail column in my DB is alwas NULL.
I''m using S3 as my storage system. Anyone else having this issue with
thumbnails?
has_attachment :content_type => :image,
:storage => :s3,
:max_size => 500.kilobytes,
:resize_to =>
2007 Apr 21
3
attachment_fu thumbnails
howdy!
I had the problem that attachment_fu didn''t make a thumbnail, but
everything else worked. I read this post
http://www.ruby-forum.com/topic/104213 and added a parent_id column. now
I get the following error when I trie to add a photo:
undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for
Photo:Class
my code is:
class Photo < ActiveRecord::Base
2007 Apr 17
1
attachment_fu - propagating attributes to thumbnails
I have a model using attachment_fu (via has_attachment) and I''m
creating thumbnails for the attached images. I have an extra field
''foo'' that I''m validating on create with validates_presence_of :foo.
One problem arises when I upload an image:
The ''foo'' is not propogating down to the thumbnails. What should I
put in my model to grab the
2008 Mar 14
2
attachment_fu attributes in db
I''m using file_column for upload images.
now,I want to use the plugin attachment_fu.
I have seen that for use it, i must create the attributes like:
class CreateMugshots < ActiveRecord::Migration
def self.up
create_table :mugshots do |t|
t.column :parent_id, :integer
t.column :content_type, :string
t.column :filename, :string
t.column :thumbnail,
2009 Jul 24
1
Attachment_fu - watermark tmp file before saved to S3
Hi there,
I''d like to use RMagick to watermark an image in the tmp directory
before Attachment_fu saves it to Amazon S3.
I took a look at the callbacks available in attachment_fu. There''s an
''after_attachment_saved'' method but this would be too late, and a
''before_thumbnail_saved'' but this is no good because it''s for
thumbnails.
I
2007 Nov 11
6
Reducing dependency on remote ferret process
Hi.
We use FerretDrb for search. If the ferret process is down, our entire
application comes down the moment we try to save a model which is indexed.
Is there a way to decouple this relationship such that we can somehow
resume normal operations despite ferret being down and not index the model?
Thanks.
Morten
2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
It took me a while to figure this out and I don''t see any wiki pages
for attachment_fu so I figure I would just post this here.
I didn''t like the way attachment_fu by default creates directories
under a given directory for a specific class e.g.
item_image/1/img_1.jpg
item_image/1/img_1_thumb.jpg
item_image/2/img_2.jpg
item_image/2/img_2_thumb.jpg
item_image/3/img_3.jpg
2007 Mar 06
3
aaf excluding certain db records from indexing
hi!
short question about aaf:
is there a builtin functionality in acts_as_ferret to exclude records
from being indexed when for example a column "is_deleted" /
"is_disabled" / "dont_index" has a certain value?
regards
neongrau
--
Posted via http://www.ruby-forum.com/.
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make
attachment_fu polymorphic, so you no longer need a different table and
Model class for every associated attachment (Productimage, Ad_doc,
etc). All you really need is one model and table to handel all your
attachments - in some cases, anyway. I have the code working, but have
run into one small hitch that I can''t seem to
2007 Oct 04
2
Offline indexing issues
If I disable ferret in my environment file and then run a cron job
every hour to index the records that have been added/changed, do I
enable Ferret just in the script that does the hourly indexing? Or do
I somehow need to tell the process that runs the Ferret DRB server
that it should start writing to the index again? Thanks in advance.
Erik
2006 Nov 06
21
acts_as_ferret and associations
I have the following models:
class Book < ActiveRecord::Base
acts_as_ferret
belongs_to :author
end
class Author < ActiveRecord::Base
has_many :books
end
and in the controller:
def search
if params[:query]
@query = params[:query]
@total, @books = Book.full_text_search(@query, :page =>
(params[:page]||1))
@pages =
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi,
am using this wonderful plugin acts_as_ferret and according to the
tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic
I worked it out except the pagination feature.
If I have 12 records and I give limit to 10, its correctly displaying 10
records in the first page and is giving the link to the second page too.
But when I go to the next page I find the same 10 records instead of
2007 Feb 06
1
Attachment_fu ImageScience FreeImage thumbnail quality
I''ve tried migrating acts_as_attachment to attachment_fu (just to see
if I could replace RMagick with ImageScience+FreeImage), but the
quality of the thumbnails is just horrendous, blurred beyond
recognition (downscaling a 1280x1024 to a few considerably smaller
thumbnails).
Changing attachment_fu to use RMagick again and the thumbnails were
crispy sharp again.
I was wondering
2008 Jan 11
3
Date range queries return zero results
Hello,
I am having trouble getting data ranges to work correctly. I am using
the following command to load the db:
index << {:title => row[7].to_i,
:date => Date.strptime(row[3], ''%Y-%m-%d''),
:page_id => row[5].to_i,
:page => row[6].to_i,
:content_type => row[1].to_i,
2009 Feb 17
1
cloning an already uploaded image using attachment_fu
Hi,
I have an Image model that is attached to a item. The image was uploaded
through attachment_fu. Now, I want to reuse the same image for a new
item. I tried several tips found online. For example in
http://danieloshea.com/articles/254-cloning-images
# Create a clone of an image and it''s thumbnails.
def create_clone
c = self.clone
self.thumbnails.each do
2008 Jan 06
3
Did you mean ...? with act_as_ferret
Hello,
does anybody know how to implement a "Did you mean ...?" like Google
with act_as_ferret?
I think this is a possible way:
1. Generate a keyword-list (this is my difficulty. I don''t know how to
build such a list from the index) with no stop-words from the first
index.
e. g. (car, ship, plant, house)
2. Build a second index from this word-list where we store the word in
2009 Apr 21
3
attachment_fu giving problem on production
Hello friends,
I have configured attachment_f. It''s working fine on Local(development)
system but giving problem on production. Basically on production the
attachment_fu is not able to generate thumbnail image it saving the original
size image. Below is the configuration.
has_attachment :content_type => :image,
:storage => :file_system,
:max_size