Displaying 20 results from an estimated 20000 matches similar to: "Routing requests without ID parameter"
2006 Apr 13
2
Automatic finder
It looks rails automatically creates a "finder" method on models that have a "belongs_to". So I tried this in the console:
c = Category.find(2)
chunks = Chunk.find_by_category(c)
chunks is always returned as an empty array. When I know have some chunks with a category_id of 2.
Should the find_by_category do what I think it should be doing or am I completely off base?
2006 Apr 06
3
has_and_belongs_to_many find
Say I have a post model that has_and_belongs_to_many :categories, and a
category model that has_and_belongs_to_many :posts. So I have a
categories_posts table to do the join. That''s all find and dandy.
However I want to be able to find all the posts that belong to a
specific category.
I tried Post.find_by_category(:id) but that doesn''t work.
Does anyone have any insight?
2005 Dec 16
3
Adding methods to models
All,
This is more of a theoretical question I suppose - I''m looking for what the
consensus is for the "correct" approach in Rails/MVC.
I have a standard security model where a User can have many Roles. There is
a User model, a Role model, and in the db, a linking table, etc. Each role
has a name as well as a category (say, name="waiter", category="restaurant
2006 Apr 13
3
Sorting an array of models
I have a model, listing, which belongs_to one or more categories. I need
the user to be able to search for categories by name (which I can do)
and have it return all the listings that belong to those categories.
This I can do.
However, what I need to do is take that list of listings and sort them
by one of their fields. This is a bit more complicated, without needing
to sort I could just do:
2006 May 31
1
url parameter :id with slash (/) failed to route
Hi there,
My routes.rb is something like
map.connect '':controller/:action/:id''
However, when a url request likes
http://xxx/user/category/a/b
My intension is to call
:controller => ''user''
:action => ''category''
:id => ''a/b''
However, :id has slash in it (a/b) will make rails fail to route.
(apache fail, webrick
2011 Aug 24
3
How to connect Ruby with MySQL (XAMPP)?
*Dear All:*
I need your help on following points.
1. Can I connect Ruby with MySQL in XAMPP server?
2. Could someone tell me that how to connect MySQL with Ruby? I have XAMPP
server installed and want to connect with ruby.
I am using Ruby1.8.7.
I tried following code:
require ''rubygems''
require ''mysql''
begin
# connect to the MySQL server
2004 Sep 11
4
Cancor
Dear R's!
I am strugling with cancor procedure in R. I cannot figure out the
meaning of xcoef and of yxcoef.
Are these:
1. standardized coefficients
2. structural coefficients
3. something else?
I have tried to simulate canonical correlation analysis by checking the
eigenstructure of the expression:
Sigma_xx %*% Sigma_xy %*% Sigma_yy %*% t(Sigma_xy).
The resulting eigenvalues were the same
2006 Mar 15
4
[NQ] How to set an initial FK for a new item of something?
Hi all,
running into a little problem here. I''ve a list of things
with a "New thing" link beneath it. When you click that link,
obviously, a new thing shall be created. Now, that works pretty
fine for things that don''t have foreign keys, but for things that
do it crashes, since there is not yet a thing.other_thing.name
available.
I suspect you can somewhere in
2020 Sep 16
2
force samba 4.12.5 to log failed and succeeding authentication
Hi all,
i'm strugling since a few hours to find what i can do to have some debug
information in samba on succesfull or unsccessful login attempt.
I'm running the standard bulleye samba deb package.
Systemd is installed and see some thing , but whatever i put in smb.conf
It seems like i can't have access to those information.
i have allready try :
-log level = 1 auth:5 winbind:5
2019 Apr 28
2
"Untrusted application launcher (desktop launchers)"
I am having this problem on Ubuntu 18.04 -- I manage a batch of desktop
machines with some convience desktop launchers, which gnome3 insists are
"untrusted". With some general websearching reveals that this is a *GNome3*
so-called "security" issue
(https://gitlab.gnome.org/GNOME/nautilus/commit/1630f5348). I found a thread
on the CentOS Forums (I don't have an account
2015 Feb 21
9
Winbind backend : rid is too much underappreciated
I just came to the conclusion that the rid backend has been very much underappreciated. Too much mental inertia about how things used to be made?
After strugling for two days to configure a member server against a Samba Active Directory with the ad/RFC2307 backend, I turned to the rid backend and voil?! all my problems are gone. Having to manually edit uids/gids in UNIX Attributes under RSAT
2005 Mar 23
1
BV Outbound Drop fixed .
Compiled from CVS today and no more dropping outbound calls after 40
secs. :D (was using cvs from 3 days ago)
(just thought I'd pass it along in case anyone is still strugling with
broadvoice calls)
2006 Jan 20
1
Connecting a TE to a NT BRI isdn
Hi everybody,
I'm strugling between two devices: the both TE but one was set up as a TN. I
have no current on that interface. I have tried to find some circuit over
the net to power the connection, both commercial and home made. Can anybody
give some hint?
Ciao
Mauro
2011 Dec 13
1
dovecot penalties and anvil
Hi,
I'm strugling to find some documentation on dovecot's anvil service
and/or its penalties (that can be checked with doveadm penalty) ... but
i'm not finding anything on that.
is there any documentation on anvil/penalties that i should check
other than a few messages on the mailing list archive ?
thanks !
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
2009 May 06
7
Quota over NFS
Hey,
I've been strugling to get quota working on my enviroment.
I have one storage server that exports the 'home' dir.
My mail server mounts the exported 'home' server at '/home'
# dovecot --version
> 1.1.14
I'm also running Postfix and using Dovecot/LDA as MDA so that we can use the
Dovecot's Quota plugin.
The thing is that if the user has exceeded
2009 Mar 19
1
problem with Dates
Hi all,
I am strugling with date formates and caliculating diferent operations like
different between 2 dates and
getting minimum in vector of dates
that is i m working with dates in formate "6/22/1992 12:00:00 AM"
and the vector is
[1] 6/4/1992 12:00:00 AM 2/13/1992 12:00:00 AM 6/19/1992 12:00:00 AM
[4] 2/11/1992 12:00:00 AM 6/22/1992 12:00:00 AM 10/3/1991
2019 Apr 28
3
"Untrusted application launcher (desktop launchers)"
At Sun, 28 Apr 2019 18:53:21 +0100 CentOS mailing list <centos at centos.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sun, 2019-04-28 at 12:11 -0400, Robert Heller wrote:
> > I am having this problem on Ubuntu 18.04 -- I manage a batch of desktop
> > machines with some convience desktop launchers, which gnome3 insists are
> >
2005 Sep 25
2
Problem issue with belongs_tohas_one and error_message_on
Hello
I have a problem with relationship with belongs_to - has_one and with
error_message_on
I have splitted one huge table users into two tables user and profile.
In users I''m keeping main fields like id,email,password and in profile there are
the rest of fields.
Table users:
id,email,password
Table profiles:
id,user_id,publicname, and more ...
My models are:
- user.rb
has_one
2016 Aug 31
3
status of Continuous availability in SMB3
hi Michael Adam:
Thanks for you work on samba. Here I am looking for some advice and your help.
I have been stuck in continuous availability of samba 4.3.9 for two weeks. Continuous availability in SMB3 is an attractive feature and I am strugling to enable it.
smb.conf, ctdb.conf are attached. Cluster file system is cephfs and mount to /CephStorage
client: Windows 8 Pro
root at node0:~# samba
2017 Nov 24
2
number to volume weighted distribution
Dear all
Strictly speaking it is not R question but as you are the most capable persons I know I give it a try.
I am strugling with recalculation of number weighted to volume weighted distribution.
Suppose I have objects (cubes) with size
x<- c(rep(10,20), rep(100, 10), rep(300,5))
I can get
plot(ecdf(x))
or the number weighted average
mean(x)
[1] 77.14286
or volume weighted average