Displaying 20 results from an estimated 800 matches similar to: "Trouble using RESTful helper"
2006 Mar 13
3
HABTM: two habtm''s between the same two tables
Imagine I want to track people, and the clubs that they belong to.
table people with columns person_id, person_name
table clubs with columns club_id, club_name
And I have the association table:
table clubs_people with columns person_id, club_id
Now I know how to do this habtm between the two, in order to associate
people with clubs that they belong to.
However my application also needs a
2008 Mar 07
3
Boolean circles..
Hi,
This is just kindof a RoR question, but since you all potentially do
the same things as I do, I thought I''ll ask here..
Im trying to use the boolean type in the database. Migrations is no
problem, it even converts the 0/1 values from my import CSV to false
and true.
However, I cannot make the :conditions part of a find work:
Loading development environment (Rails 2.0.2)
>> c
2008 Mar 03
2
how can i know type of attribute with active record
Hello,
In my database, I have a table "products" with attributes :
- id
- title ->string
- desc -> text
I use active record, but I don''t know why recover the type of this
attribute with active record?
I try attributes_before_type_cast but I don''t see the type
Can you help me?
Excuse for my english (I''am a young student french)
--
Posted via
2007 Nov 01
1
List of Nth removed associated objects.
Given the following..
Foo has_many :bars
Bar has_many ::widgets
Widget has_many :gadgets
Gadget has_many :parts
All of the following are now possible...
@foo.bars
@bar.widgets
@part.gadget.widget.bar.foo
However, I can''t just do the opposite of that last one...
@foo.bars.widgets.gadgets.parts
and get a full list of every Part associated with @foo.
I know there''s several
2008 Mar 06
2
GateKeeper, Model Level Permissions Management
I''m pleased to announce the official release of "GateKeeper".
GateKeeper is a Rails plugin that provides easy to use methods to
declare access permissions to instances of ActiveRecord classes at the
model level. Permissions may be based on either a user''s roles (such as
Admin, Moderator, etc) or on associations with other models.
In most simple and straight forward
2008 Mar 20
2
link_to_remote confirm dialog title
Is there any way to set the confirmation dialog title when using
link_to_remote with the :confirm option?
In Firefox the dialog works fine but the title is:
"The page at http://localhost:3000 says:"
It would be nice if I could set that to something meaningful.
Any information is appreciated,
Rick
--
Posted via http://www.ruby-forum.com/.
2008 May 20
3
Flash message not shown after redirected by verify
I have the following snippet in a controller.
verify :params => "post", :only => [:create, :update, :destroy],
:add_flash => {"notice" => "Invalid Access"}, :redirect_to => {:action
=> ''list''}
If I directly access /posts/create by typing URL (GET), the program
redirects to the "list" action, but the flash message I
2008 Feb 01
4
How to sanitize _before_ going into the database?
I use a call to the sanitize method every time I render some user
input, but it would be much nicer if I could clean it up once before
putting it into the database and avoid having to call the (relatively
expensive) sanitize every time I render a page.
My first thought was to just add something like:
def message=(x)
self[:message]=sanitize(x)
end
However, the sanitize helper cannot be called
2010 Oct 21
2
In-memory databases vs PHP Bindings
I can't quite connect the dots on this, perhaps someone can help. I'm
simply trying to create an in-memory database comprising a single document,
so that I can run a load of queries against it and see if any of them match
the new document (this is to enable users to have 'subscriptions' to saved
searches and be alerted every time a new item is published that matches
their
2007 Apr 05
1
FLAC: command line output
Hi,
I'm using the FLAC command line tool to encode my WAV files in some
directory to FLAC files.
Now I noticed sometimes the output of the tool is mostly like this:
flac -V --best "14 The Hose - Time Warp (Old Skull Mix).wav"
flac 1.1.4, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh
Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
2007 Feb 24
0
after_create not creating the right object
I have 2 tables... club and forum, which use the "type" as I''m
subclassing the Club and Forum objects. Tables are:
clubs:
id
title
type
forums:
id
club_id
title
type
I''ve put an "after_create" callback in the Club as Club has_one Forum:
class Club < ActiveRecord::Base
after_create :create_forum
has_one :forum
def self.create_forum
# create it
2009 Jun 18
0
area of ellipses (car)
hi,
i am using this script on our webserver to plot data / draw ellipses
for a flex movie...
would like to add the areas of the ellipses to another legend just
like the means for
the distance.
the data looks like: x (dispersion), y (distance), Club (name of
the club for grouping)
thanks, sam
## usage: Rscript nikeScatter.R infile outfile level1 level2 minX maxX
minY maxY
## load
2015 Jan 10
0
Link-dest thinks file is newly created, but it isn't
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What does --itemize-changes say about that file? Try using the stat
command on the various copies of it to see what is different about them.
On 01/09/2015 09:42 PM, Clint Olsen wrote:
> Hi:
>
> I've been using rsync for a couple years now. Unfortunately, I've
> made some changes on both ends, so it's unclear what could be
2013 Apr 15
2
regression with paired left-censored data
HI
I am trying to analyse data which is left-censored (i.e. has values below the detection limit). I have been using the NADA package of R to derive summary statistics and do some regression. I am now trying to carry out regression on paired data where both my X and Y have left-censored data within them.
I have tried various commands in R:
rega = cenreg(Cen(conc, cens_ind) ~ Gp_ident))?
with
2005 Oct 26
2
validates_associated ... doesn't
Hi,
I think I''m missing some fundamental information here so hopefully
someone can help me. I have a model Club which has many members,
members of course belong to a Club. I''d like to ensure that when a
members is saved (saved/created/updated) only valid club_id''s are accepted.
I have a Club model (simplified) like this:
class Club < ActiveRecord::Base
2007 Jan 06
2
ubuntu packages patch
hi,
For compiz ubuntu packages, I made some patchs to have a behavior of
compiz nearer to metacity. All patch are made for compiz-0.3.6 and they
are more hacks or draft than good fix, i hope they can help.
http://gandalfn.club.fr/ubuntu/compiz-patch/90-fix-no-border-window-shadow.patch
This patch fix white boxes instead of shadows for gnome-panel and other
non-standard windows on AiGLX.
2015 Jan 10
2
Link-dest thinks file is newly created, but it isn't
Hi:
I've been using rsync for a couple years now. Unfortunately, I've made some
changes on both ends, so it's unclear what could be the culprit. I make
extensive use of --link-dest to provide a cheap "Time Machine"-like backup
for a Windows machine.
Source: Windows 7 running Cygwin (CYGWIN_NT-6.1 sith 1.7.33-2(0.280/5/3)
2014-11-13 15:47 x86_64 Cygwin)
Destination: Synology
2015 Mar 19
1
Patch(es) and task list to resolve CVE-2015-0240 for version 3.6.23 on Solaris
Good morning.
I am looking to resolve the above vulnerability on our T-4 Solaris boxes. I have not worked or patch Samba before and not sure of the process.
When I find and apply the patch will it resolve the issue on the version that we are running or do I need to bring our current version more up to date?
Any assistance would be greatly appreciated.
Tks in advance.
rG
Database Administrator
2010 May 14
4
Tricky model situatione
I have two models Club and users. users are regular authenticated
users and some of them might create a club. A club can also have
members (essentially users) and there are attributes and models that
apply to member but not to users.
Here is what I have right now.
Club => belongs_to :user
User => has_many clubs (since a user can host multiple clubs).
Now how do I fit this member model
2007 Jun 16
0
Xapian new user
Hi List!
I'm new here. To start, I would like to let you know that
I'm maitaining a "xapian" port for "Crux Linux" at:
http://yhafri.club.fr/crux/index.html
http://yhafri.club.fr/crux/xapian-core/Pkgfile
http://yhafri.club.fr/crux/xapian-omega/Pkgfile
http://yhafri.club.fr/crux/xapian-bindings/Pkgfile
cheers
Y.