Displaying 20 results from an estimated 1000 matches similar to: "Recommendation for searching with regards to timestamp & foreign key attributes"
2010 Jan 15
1
Chaining queries in ActiveRecord
Hi all,
Stuck at this problem for several days. Tried to use named_scope,
scope_out, and plugin such as searchlogic, but no result.
The problem is as follows: I have a pic table and tag table, and a
join table called pic_tag (with only pic_id and tag_id) so that I can
associate N pics to M tags. This is the tutorial way to set up a many-
to-many association. I''m trying to implement a
2010 Mar 09
1
Ruby 1.9 and Searchlogic problem
Hello,
After updating our Rails app to ruby 1.9 there are some problems with
searchlogic, here you can find the error :
Error : wrong number of arguments (1 for 0)
Full trace ( passenger ) :
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in
`call''
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in
2010 Mar 01
0
undefined method for Polymorphic association using Searchlogic
I am unable to call a polymorphic scope using the searchlogic plugin
as it keeps on returning ''undefined method''. I am certain it is only a
problem within my project as I created a test project and I was able
to call a polymorphic scope using the searchlogic plugin.
I am hoping someone can provide a suggestion on how to debug this
issue.
My project consists of several gems, and
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
Hello,
I''m using: Ruby 1.8.6, Rails 1.2.3, ferret 0.11.4, acts_as_ferret from
svn stable.
I''ve had quite a day wrestling with trying to remove the use of
stopwords. The problem was that when searching for words like "no" or
"the", no results were found. I found a confusing thing behavior that
has taken me some time to figure out, and I hope sharing it
2009 Jul 23
11
Problem with named_scope
Here are my scopes:
default_scope :order => ''posted_on DESC'', :conditions => { :status =>
''visible'' }
named_scope :positive, :conditions => { :rating => ''positive'', :status
=> ''visible'' }
named_scope :neutral, :conditions => { :rating => ''neutral'', :status
=>
2008 Nov 26
3
New status_id in Facebook API - FIX
Hi,
I''ve had one of my application broken this morning (French time) with
this error :
NoMethodError (undefined method `status_id='' for
#<Facebooker::User::Status:0x2ad52d1c8478 @message={}, @time="0">):
It appear that Facebook API had change in the status : a status_id
node is new :
<user>
<uid>785637999</uid>
2010 Sep 01
4
deprecation warning in Rails 3 about Base.named_scope
I recently upgraded to Rails 3, and this error has come up
ubiquitously:
DEPRECATION WARNING: Base.named_scope has been deprecated, please use
Base.scope instead.
Any ideas on how to get rid of it? Or should I just wait for
something?
There''s actually no place in my application where the code
"Base.named_scope" exists, so I assume the problem is inherent in gems
that
2009 May 12
4
has_many :through and scopes: how to mutate the set of associated objects?
I have a model layer containing Movie, Person, Role, and RoleType,
making it possible to express facts such as "Clint Easterbunny is
director of the movie Gran Milano".
The relevant model and associations look like this
class Movie < ActiveRecord::Base
has_many :roles, :include => :role_type, :dependent => :destroy
has_many :participants, :through => :roles, :source
2005 Dec 06
4
Joining Samba3 to NT4 domain problem
Hi all,
I try to join samba3 to NT4 domain:
My smb.conf is following:
[global]
workgroup = MYDOM
netbios name = LANSERVER
server string = Samba Server
security = domain
hosts allow = 10. 127.
log file = /var/log/samba/log.%m
max log size = 50
password server = PDC
#encrypt passwords = yes
#winbind uid = 10000-20000
#winbind gid = 10000-20000
idmap uid = 15000-20000
idmap gid =
2005 Dec 05
2
wbinfo and user group
Hello,
I have a problem with to obtain an user group.
My config is :
Redhat server 3.0 update 1
samba-3.0.20b
my smb.conf is :
****************************
[global]
workgroup = domxxx
password server = xxxx, xxxx
security = ads
winbind uid = 10000-20000
winbind gid = 10000-20000
winbind use default domain = yes
winbind enum users =
2006 Jun 08
1
question about finding with :include versus nested dynamic finder (bad form? efficiency?)
I have a User model and a Status model. Each user is given a certain
status, either "Accepted", "Rejected", "OnHold", "Declined", etc. I
need to find all users with a status of "Accepted", so I''m doing the
following:
in User.rb:
belongs_to :status
def accepted_users
status_id =
2006 Jul 03
1
how to get value from the post on the List page
Hi,
I''m new to Rails. I''m building a candidates tracking system for
recruiting. I have a List page, but instead of listing every candidate,
I only wanted to list the candidates in certain statuses. The first
time List page is hit, by default, it lists candidates in status < 9.
But on the List page, there is a dropdown where all the statuses are
listed, so that when user
2009 Jul 11
2
offeride :limit named_scope default_scope
Hi,
Rails 2.3.2
class TestD < ActiveRecord::Base
default_scope :limit => 12
named_scope :limit, lambda { |num| { :limit => num} }
end
ruby script/console
>> TestD.all
TestD Load (0.7ms) SELECT * FROM "test_ds" LIMIT 12
=> []
>> TestD.limit(14)
TestD Load (0.3ms) SELECT * FROM "test_ds" LIMIT 12
=> []
Any ideas why the default limit
2006 Aug 09
1
question about enforcing constraints in the model
I have a user model and a status model. Each user has a specific
status (accepted, rejected, declined, etc).
I have a form that allows the adminstrator to change certain options
for a user, including their status. I''m using a drop down menu
populated with the different status values, and a default option that
says "Choose a new status" with a value of "".
I want to
2010 May 16
3
searchlogic
Hey
The guys at the searchlogic google groups seem to be asleep -.-
They didnt'' grant me permission to post yet.
But anyways, right now, I followed the searchlogic tutorial found here
-http://www.binarylogic.com/2008/09/07/tutorial-pagination-ordering-
and-searching-with-searchlogic/
however, in that tutorial, the results of the find displays all my
items, before i even search for
2011 May 04
1
is not allowed as an instance variable name error
Hey all,
I get error like this:
ActionView::TemplateError
(`@content_for_details_view_builder__-626960428'' is not allowed as an
instance variable name) in app/views/shared/_details_view.haml:
searchlogic (2.4.27) lib/searchlogic/rails_helpers.rb:75:in
`fields_for''
searchlogic (2.4.27) lib/searchlogic/rails_helpers.rb:64:in
`form_for''
2009 Aug 03
5
Decimal datatype and trailing zeros
Hello
I''ve encountered a little problem with zeros using the decimal data
type
Specifying a scale of 3 and inserting a number with 3 zeros after the
point (for example 12345.000) it gets correctly stored in the
database, but rails insists to show me the number only with the first
zero after the point (12345.0)
There is a way to tell rails to not truncate at the first zero?
2006 Jan 27
1
Basic Many-to-One association
Sari,
I got the list display working without doing an explicit find.
It took a bit of a conceptual convulution to get it to work. I was
thinking of it has Many Cases have One status.
There is no support for Many-to-One so I was a bit stumped.
Then I realized you just have to turn around your thinking to say One
Status has Many Cases. Thus it is a One-to-Many relationship. That
is descriped
2010 Jan 18
1
binarylogic-searchlogic ~> 2.0 binarylogic-authlogic mbleigh-subdomain_fu
I am having problem starting my app, here''s the error message, i am
running Ubuntu 9.04 with Apache with Passenger:
The application has exited during startup (i.e. during the evaluation
of config/environment.rb). The error message can be found below. To
solve this problem, please follow any instructions in the error
message.
Error message:
Missing these required gems:
2008 May 22
14
Specifying certain tables NOT to be cleared each example?
Is it possible to specify that certain tables not be cleared on each
example.
I''ve inherited a project where a good amount of enumerated data is
stored in the database (US States, statuses, about 15-20 tables worth.
Over all, it''s a reasonable decision that leads to solid production
code (acts_as_enumerated is good). This data is read-only and
relatively static; any