Displaying 20 results from an estimated 3000 matches similar to: "Custom Non-ActiveRecord Classes or not..."
2005 Mar 01
0
acts_as_tree counter_cache
Hi List,
I''m new to and hot on RoR.
And I have a question regarding acts_as_tree and counter_cache.
What methods actually update the counter_cache column?
I''ve only really started the app so i''ve just got it set up so that I
can select the parent node (from a list of nodes that exclude all
descendants of the current node) with a radio buttoned list named and
valued
2006 Apr 07
2
errors.add_to_base
What are the limitations on using:
errors.add_to_base
to display errors in views?
I have tried for days to add errors from my object.rb and they never get
displayed.
class Keyword < ActiveRecord::Base
validates_presence_of(:name, :message => "Name is required.")
validates_uniqueness_of(:name, :message => "This name is already in
use. Please try
2006 Jun 08
2
counter_cache is not looking for children_count with acts_as_tree
Hi there, the acts_as_tree API says that I can set a counter cache and
that it will automatically increment the "children_count" column. I
did that but when I create a new page it asks for a "pages_count"
column instead.
Here is the relevant part of page.rb model:
class Page < ActiveRecord::Base
acts_as_tree :order => :position, :counter_cache => true
2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
Before I file a ticket, I''ll query ya''ll about this:
The API docs for acts_as_tree''s counter_cache is to create a database column
called "children_count" to hold the counter_cache. I have enabled this
option in my model. While writing tests I wrote a test for creating children
from the a parent:
message = @forum_message["parent"].find
child =
2007 May 14
3
install opt-samba-base on aix 5.3
I am trying to install samba 3.0.24 on aix 5.3. I have downlaoded the binaries
from samba.org and I am using the directions found at:
http://us4.samba.org/samba/ftp/Binary_Packages/AIX/
The directions dont specify installing the base. WHen I try to install the
pware 3.0.24, it fails due to required packages missing.
I do not see a way to get opt-samba-base installed.
Included below is the
2011 Jun 07
2
Disk free space, quotas and GPFS
I am migrating the main file servers at work onto a new storage platform
based on GPFS. I am using RHEL 5.6 with the samba3x packages (aka 3.5.4)
recompiled to get the vfs_gpfs and tsmsm modules, with a couple of extra
patches to vfs_gpfs module to bring it 3.5.8 level. It is running with
ctdb against Windows AD 2008 R2 domain controllers with all the
idmapping been held in the AD.
In order to
2003 Jan 19
0
rsync+ (batch mode) feature suggestion
Bert,
Hi. If you are still interested in your rsync+ project, changes for
which have evidently been (and are, perhaps, still being?) submitted
to the official, upstream rsync version, you may want to add the
following feature, proffered below, in order to conduce a little
greater batch mode usage flexibility primarily for those with above
average security concerns.
Currently (at least in the
2004 Mar 10
0
RFE: create batch without patching
Hi,
Currently, rsync --write-batch creates the batch fileset and also
updates the destination. I suggest adding the ability to disable the latter.
Motivation: I wish to sync two large but similar directories residing in
different machines. There is a slow (dial-up) network connection between
the machines, but I have physical access to both. Thus, I would like to
create a batch fileset by
2006 Mar 25
2
acts_as_tree wierdness with children.count and children.size
i am making a category tree and i iterate over the category using my
counter_cache however it would show a different number than what was
actually being represetned in the tree.
Here is an example
cat.children = [cat2, cat3]
puts cat.children.size 2
puts cat.children_count 2
cat4.parent_id = cat.id
cat4.save
puts cat.children.size
2006 Mar 29
3
Self-referential many-many joins with :through
I thought I had this nailed but.. now I''m seeing spots..
I''ve included my models below, feel free to ignore them. I''m really
just after an example that works. I couldnt find one on the wiki...
which is fair enough considering Ricks patch:
http://dev.rubyonrails.org/changeset/4022 that fixed them only went
through 5 days ago..
Cheers
-henster
2014 Jan 21
1
Cluster Size discrepancy between FAT32 and NTFS
On Tue, Jan 21, 2014 at 2:41 PM, mike setzer <qualityana at sbcglobal.net> wrote:
> hello Gene,
>
> good to get your message
>
> I have not seen a link to reply to a particular thread,
> so I am replying to you right now
> hopefully the thread can be made to look right, also I double posted since my connection was lost
> right during the first posting.
Sorry, I
2006 May 30
2
acts_as_tree, acts_as_list and is invincible (help!)
So I have the following model
class Topic < ActiveRecord::Base
belongs_to :topic
has_many :topics, :order => :position
acts_as_tree :order => :position
acts_as_list :scope => :topic_id
end
that I use for a site''s navigation. Everything (list, create, edit, even
the drag&drop sort) works fine, except the destroy function, which the
vanilla version
def destroy
2005 Sep 23
6
problem with acts_as_tree
Hi,
I''m using the latest gem version of rails under MacOS Tiger.
I was trying to use acts_as_tree as described in the rails book. So
I have something like:
class Category < ActiveRecord::Base
acts_as_tree :order => "title"
end
create table categories (
id int not null
auto_increment,
title
2015 Dec 18
1
Assistance much appreciated
On 2015-12-18 02:29, Simon Urbanek wrote:
> Michael,
>
> I got access to PDP AIX so I can try to replicate your problem. Can you, please, share exactly your setup - AIX version and well as how exactly you installed the compilers (=where from)? I can then try to replicate it. AFAICS there is no official binary for gfortran nor gcc 4.7 so it must be some 3rd party - which could also be a
2006 Jul 11
1
counter_cache, has_many and belongs_to
I am a bit confused about counter_cache here. The API docs
http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html
say that only the belongs_to association can take the :counter_cache
option. When I try to use it on a has_many I get an "unknown key(s):
counter_cache" error.
Why would this be the case? belongs_to means that this model has a
field with an id
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
I am working on an Rails application that uses a pretty complex
category structure through out the site. I have defined a table to
house all the info and a FK to reference parents within the table
CREATE TABLE categories (
id int(11) NOT NULL auto_increment,
name varchar(50) NOT NULL,
parent_id int(11) default NULL,
constraint fk_category_id foreign key (category_id) references
2007 Aug 23
0
active scaffold polymorphic model
Hi
I am trying to use active scaffold to build a polymorphic model .
I have a number of models that can be featured and I have a Feature model
that belongs_to :item, :polymorphic => true
In my config.columns I include :item_type and item_id, I also added
:item_name to show the name of the record in the form.
In the form, when a type of model is selected I populate the select box for
2015 Sep 03
2
semi-OT: help needed w/ bareos
IP wrote:
> W dniu 2015-09-03 o 13:56, mark pisze:
>> On 09/02/15 21:27, Leon Fauster wrote:
>>> Am 02.09.2015 um 22:18 schrieb m.roth at 5-cent.us:
>>>> I've got it installed on a 6.7 server, and can back up and restore for
>>>> Linux. Now I'm trying to do it for some users' WinDoze boxes.
>>>> Trouble is,
>>>> all I
2013 Jan 25
3
how to delete the null elements in list
HI,
I have the list:
> suu
[[1]]
NULL
[[2]]
NULL
[[3]]
item_id prod
1 2
[[4]]
item_id prod
1 2
2 4
how to delete all "NULL" elements from suu to get only
>suu
[[3]]
item_id prod
1 2
[[4]]
item_id prod
1 2
2 4
??
Kind regards,
Tammy
[[alternative HTML version deleted]]
2006 Dec 11
2
join and sort on 'best match'
Hi Everybody,
I have been breaking my head on the following problem: how to join 2
tables and sort the results on the best match.
explanation:
- there are 3 tables, items, tags and items_tags. The items_tags table
links items to tags.
- I have one item which has certain tags, and I want to look up all the
other items that have those tags as well
- results should be sorted and presented by