Displaying 20 results from an estimated 1000 matches similar to: "Testing that named_scope is defined"
2010 Nov 19
1
[PATCH] i915resolution: add id for GM45 chipset
Tested with a Dell Vostro 1320 laptop. After booting with
'MENU RESOLUTION 1280 800' in config file, this is the ouput
of 'hwinfo --framebuffer':
02: None 00.0: 11001 VESA Framebuffer
[Created at bios.459]
Unique ID: rdCR.fRULN9k9OD4
Hardware Class: framebuffer
Model: "Intel(r)Cantiga Graphics Controller"
Vendor: "Intel Corporation"
Device:
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
=>
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 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
2010 Jan 05
2
Conditional named_scope chaining with params (Need help)
Hello there,
I have a model that has more then one named_scope.
In my action Index of the controller that handle this model I want to do
this in a drier way:
if params[:ownership] == "mine"
@posts = Post.tagged_with(params[:tags], :on =>
:tags).owner(current_user.id).paginate :all, :page => params[:page],
:order => ''created_at DESC''
else
2012 Dec 27
2
A Couple Questions About a New Project
My compliments on the release of syslinux-5.0 and happy holidays to the
entire Syslinux team.? I have a longer message in me.? Lots of
curiousity about the direction of the project, but that will have to
wait until I finish my first 5.0 project (*not* my first Syslinux
project), which just happens to touch past problems: drive
enumeration.
This particular effort is on a USB flash drive, with two
2007 Aug 09
2
trying to find records that haven't been updated in 2 weeks
My app has some students that have attendances. I''m trying to find
students who have not attended class in the last 2 weeks. Here is my
code that is not working:
students = @school.students.active
@missed_attnd = []
students.each do |student|
unless student.attendances.empty?
@missed_attnd << student if student.attendances.first.date <=
Date.today - 2.weeks
end
end
An
2008 Apr 04
0
named_scope and ordering
Hi,
this is a general design question and I liked to see how other people
handle the following situation: Before named_scope I wrote custom
finders for my model classes. Something like
# order.rb
class Order < ActiveRecord::Base
class << self
def find_all_marked
find(:all, :conditions => {:marked => 1}, :order => ''name ASC'')
end
end
end
Now
2008 Jun 12
0
named_scope doesn''t check for critical method names.
I just entered this ticket.
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/404-named_scope-bashes-critical-methods
It turns out that in an ActiveRecord model like this
Model << ActiveRecord::Base
named_scope :public
private
def private_method
end
public
def public_method
end
end
The method public_method will be private because named scope
2010 Nov 03
0
Accessing (updating?) the proxy_scope chain for named_scope (Rails 2.3.x)
I have many named_scopes chained together in the normal way. So far
so good. However in a couple of cases where:
1. The named scope is actually a correlated subquery and I need to
pass additional scope into it sometimes.
2. Where the presence of a named scope in the chain should change the
behaviour of a named_scope later in the chain
Given: Product.price.volume.average_discount
2013 Jun 21
3
[LLVMdev] Compiling llvm and Clang in solaris 10
I run configure in a build folder using
CC=gcc CXX=g++ ../configure --prefix=/project/scratch/packages2/clang \
--enable-targets=host --enable-shared
The configure runs fine but when I type make I get the error:
make[1]: Entering directory
`/project/scratch/tmp/llvm-3.3/build/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release+Asserts build
In file included from
2013 Jun 24
4
[LLVMdev] Compiling llvm and Clang in solaris 10
On Mon, Jun 24, 2013 at 6:17 PM, Jorge Rodrigues <skeept at gmail.com> wrote:
> Norm,
>
> thanks for the help. Applying the fix solves the issue I mentioned but now I
> have more issues.
>
> I can install clang, but when running I cannot compile and link files.
> If I compile with -c flag it works but compiling the following x.c file
> gives an error:
>
2008 Jun 12
0
Mysterious interaction between RSpec 1.1.4 and has_finder/named_scope
I just opened a Rails ticket on a problem with named_scope in Rails 2.1, and
cross-posted a message here which I send to rails-core.
I''m still a bit mystified, because I''m having a problem caused by this on
RSpec 1.1.4, but not on 1.1.3, and I don''t see a difference in code which
would explain it.
The basic problem, which I encountered upgrading our rails app to RSpec
2013 Jun 24
0
[LLVMdev] Compiling llvm and Clang in solaris 10
On Jun 24, 2013, at 4:18 PM, Stefan Teleman <stefan.teleman at gmail.com> wrote:
> I'll file the bug about the endian stuff, but we'll also have to have
> an <endian.h> in Solaris as well.
Do you still have issues after r182419?
commit 01ef4f6982451e6a7c00a713d9ae677d3a15d042
Author: Jakob Stoklund Olesen <stoklund at 2pi.dk>
Date: Tue May 21 13:36:13 2013
2008 Jul 20
0
eager loading a named_scope
Hi,
I''d like to eager load a named_scope like this:
User.find(params[:id], :include => [:friends.married])
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
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
2010 Jul 07
1
Ticket 5063: Typo in named_scope in activerecord tests category.rb
Hey all,
Does someone want to look over a super-trivial patch I just
submitted? It''s just correcting a typo; someone accidentally spelled
"group_by_title" as "gruop_by_title" in the category.rb model in the
activerecord tests. I just fixed it in the model, and in the two
places it''s referenced in the habtm test.
Thanks,
Ben
--
You received this message
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 Apr 07
3
Recommendation for searching with regards to timestamp & foreign key attributes
hi guys,
I need a recommendation for searching with regards to timestamp &
foreign key attributes. Sounds
a bit too much but here''s an example.
Suppose we have a "blog" object. It has many attributes such as
- title
- content
- status_id
- created_at
- updated_at
There are also "status" objects which have the following statuses,
"new",
2005 Jan 03
6
SipSak: error: this FQDN or IP is not valid: voicegw
Hi,
I've tried to use SIPSAK to understand the troubles i'm having about sending my voice to the person I've called (extension), after doing this tests below I always got this error "error: this FQDN or IP is not valid: voicegw".
This could cause problems (namely audio problems)?
Best regards,
Helder
voicegw:~# sipsak -C empty -a password -s