Displaying 20 results from an estimated 4000 matches similar to: "REST nested routes with has_one"
2008 Feb 29
3
How to DRY REST admin path in URLs?
Hi everyone...
For almost all of my objects I put a series of classic REST admin links
in views. For example, for a ''user'', I have
<%= link_to "Show", user_path(user) %>
<%= link_to "Edit", edit_user_path(user) %>
<%= link_to "Destroy", user_path(user), :confirm => "Are you sure",
:method => :delete %>
I am tired
2010 Sep 14
1
smbclient sending no frames outside local VLAN
[I don't know whether this is the appropriate list, if not please let me know to whom to write. I submitted this as a CUPS bug and they replied by asking me to contact the "Samba folks"? I guess that is you]
Hi,
I'm using a MacBook Pro with MacOS X 10.6.4 and am trying to print on my company's printer accessible via samba.
Whenever I try to access the print server via
2009 Dec 30
0
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi Yannis,
It looks like you're missing a second back-quote before the -o. Is that exactly what you've been typing? Have you tried typing llvm-config by itself to see what is supposed to link in?
--Sam
----- Original Message ----
> From: Yannis Mantzouratos <giannismantz at gmail.com>
> To: llvmdev at cs.uiuc.edu
> Sent: Tue, December 29, 2009 1:31:59 PM
> Subject:
2009 Dec 29
2
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi,
I 've built llvm 2.6 in linux, and then i installed it in the system
by 'make install'. However, when i try to compile a file that uses
llvm routines and libraries (by giving the command: "{compiler}
`llvm-config --cxxflags --ldflags --libs all -o Test test.cpp" where i
tried both llvm-g++ and g++ in the {compiler} field), the linking
fails and an "undefined
2010 Jan 02
1
[LLVMdev] Adding a new instruction?
Hi,
We 're working on an llvm interpreter. We perform some static analysis
to detect some blocks with a specific property, and we need the
interpreter to be able to recognise these blocks fast in time it
reaches them. We thought of adding a new instruction in the LLVM
instruction set and put it in the beginning of such blocks, so that
the interpreter would be instantly alerted that the
2000 Jan 14
1
File size limit
Hello,
I am using Samba 2.0.5a on a RedHat 6.1 system. I would like the smbd
daemon to behave like this:
When the user maps his home directory to a drive letter using Windows
Explorer, he should be able to write as much to his home dir as he wants
(no quota limit) but he should be able to read or transfer to his local
PC drive only files whose size is less than 200KB, for example. Is there
a way
2002 Dec 16
1
--backup-dir : unrecognized option
Hi
I'm running rsync 2.3.1 and when I run it with the
option --backup-dir=<some_backup_dir>, I get an error message telling that
the option is unrecognized. I'm using the package from
www.sunfreeware.com
If I'm pushing the data:
# /usr/local/bin/rsync -azb --backup-dir=/tmp -e /bin/rsh --delete /home/
backup_host:/home
/usr/local/bin/rsync: unrecognized option
2018 Jul 30
3
Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
>
> But, what happens if you let the kernel post install scripts do the work
> or setting up the initrd things?
Initially, I just rebooted from LiveCD and left Grub,kernel and dracut do
their job with the defaults, but unfortunately, boot process stops at
initrd (dracut) stage with the following error:
[ 197.768159] localhost.localdomain dracut-initqueue[252]: Warning: Could
> not
2006 Mar 14
4
has_one
I''ve got an order model that stores order data.
One piece of data is a credit card type, which is a digit 1,2 or 3.
I have a cardType model that has an id, shortName and LongName for the
credit card merchant (visa, mastercard, amex).
I want to be able to say: order.cardType.shortName, but can''t seem to
get has_one working. It works with has_many and a finder_sql statement
on
2008 Feb 19
0
Issue with Observers and has_one association...
Hey Guys,
I''m getting a peculiar bug working with Observers and has_one
associations. When a has_one association is invoked by an Observer it
always returns null. I looked in the development.log file and the SQL
for the has_one association isn''t even being executed. On the other
hand, when I replace the has_one association with just a hand crafted
method, it does get called
2008 Sep 29
1
has_one :through with :source. How to alias association?
Hi to everyone,
I have the following models:
class Attachment < ActiveRecord::Base
has_attachment :content_type => [:image, ''application/pdf''],
:max_size => 3.megabytes,
:path_prefix => ''../private/attachments'',
:storage => :file_system,
:processor => :rmagick,
2012 Nov 19
0
has_one :through NoMethodError: undefined method `klass' for nil:NilClass when doing class_name on reflection
Not sure if this is expected or not. Only happened with a has_one :through
I had setup. (Workaround is just to remove it and go through the
association manually vs has_one ..., through: .)
Not a big deal if no one has time to look at it, as it''s not a big enough
deal to look into a fix on our side.
In Rails (3.2.9) console if I do:
MyModel.reflections.each {|name,reflection|
2005 Dec 19
0
has_one mapping with arbitrary right and left hand side keys
I have two tables:
table_1:
tab1_id,
other_id
table_2:
id,
tab2_id,
something_else
I would like to specify a has_one mapping from table_1 to table_2 but
specifying that the join is based on (table_2.tab2_id =
table_1.other_id).
I am half way there with:
class Table1 < ActiveRecord::Base
set_table_name "table_1"
set_primary_key "tab1_id"
has_one :Table2, :class_name
2005 Oct 27
0
has_one with Single Table Inheritance - NameError : uninitialized constant
I am having a problem with using SIngle Table Inheritance with a has_one
relationship, and I am at a loss of what could be causing it. Below is the
related code and the error message.
class User < ActiveRecord::Base
has_one :wishlist
end
class List < ActiveRecord::Base
belongs_to :user
end
class Wishlist < List
has_and_belongs_to_many :items, :class_name =>
2006 Oct 25
0
has_one & foreign_key - generating bad SQL
- MODEL -
class Document < ActiveRecord::Base
has_one :user,
:class_name => "User",
:foreign_key => "fkey",
:conditions => "user = ''NAME''"
end
- GENERATED SQL (per the .log) -
SELECT FIRST 1 * FROM table_name WHERE (table_name.fkey IS NULL AND
(user_id = ''NAME''))
What I can''t figure out is
2018 Jul 30
2
Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
Suggestion: once it's up, rebuild the initramfs.
>
>
I tried that already, but still the same problem.
Aparently dracut does not want to activate the LVs required to boot to the
root filesystem, for some reason ...
Yannis
--
Sent from Gmail Mobile
2006 Jan 22
5
has_one not working as expected?
I messed around with Rails for a while last year, but then got busy and
had to drop it. However, I now have time again, so I''m starting to play
around with a simple database schema to model my extensive collection of
photographic material, including equipment, negatives, photographs,
etc. I''m running into an issue with using belongs_to/has_one methods.
Read on for an
2018 Aug 01
0
(EXT) CentOS Digest, Vol 162, Issue 29
Send CentOS mailing list submissions to
centos at centos.org
-----Original Message-----
From: CentOS <centos-bounces at centos.org> On Behalf Of centos-request at centos.org
Sent: Tuesday, July 31, 2018 5:30 PM
To: centos at centos.org
Subject: (EXT) CentOS Digest, Vol 162, Issue 29
Send CentOS mailing list submissions to
centos at centos.org
To subscribe or unsubscribe via the World
2008 Jan 27
4
(REST) Nested routes
Hello, I''m in troubles with nested routes. I have three models: Team,
Tournament and TeamTournaments
class Team < ActiveRecord::Base
has_many :tournaments, :through => :team_tournaments
has_many :team_tournaments
class TeamTournament < ActiveRecord::Base
belongs_to :team, :foreign_key => ''team_id''
belongs_to :tournament, :class_name =>
2013 Jan 27
0
Nested form for a has_one model that already exists
Here''s the gist of my problem: (using formtastic)
Models:
Person (has_one :color)
Color
So I have this database full of already populated Color entries via a
whole separate controller + views for creating Colors. When creating a
person, I want to be able to select a Color object without creating it.
So I''m not looking for something such as:
= semantic_form_for @person do