similar to: BUG? has_many :through makes funny queries

Displaying 20 results from an estimated 3000 matches similar to: "BUG? has_many :through makes funny queries"

2007 Aug 17
0
map.with_options :path_prefix => ''
Hello, I am getting a ''No route matches'' error in rspec with routes that have a path_prefix composed by map.with_options. Rails recognizes the routes just fine and the site works, but I can''t get the specs to pass unless I put the prefix in each individual route. Any help is appreciated. My foo model has a polymorphic owner which is what I want the path_prefix to
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2012 Jul 18
0
Rails 3.1 Optional Routes
Hi all, I am using Rails 3.1 and Ruby 1.9.2 In my application i am using optional routes like below match ''Gallery(/:gallery_id(/:image_id))(/page/:g_page)'' => "wps/ gallery#show_gallery_page",:as => :gallery_page in console i am trying to call the routes like below include Rails.application.routes.url_helpers => Object 1.9.3dev :002 > gallery_page_path
2006 Jun 08
5
update only the join table in a HABTM - how?
I have a photographers app that requires giving access to galleries for users. in one part, I want to be able to define gallery access for a user seperate from updating any of the user info. I have this function: def edit_access @user = User.find(params[:id]) @user.galleries = Gallery.find(params[:gallery_ids]) if params[:gallery_ids] if @user.update_attributes(params[:user])
2006 May 11
4
modelling data to specify user access
Hello, this is my second Rails app, and the first one I did had simple data mapping. This time I am building a site for a photographer, and they want to upload photos, and create galleries that only certain clients can log in and have access to. There will be multiple galleries, and the access to them will vary depending on how the admin assigns it to each client. There is also a porftolio
2018 Apr 04
0
uncaught exception - Unable to get id for sid in classicupgrade
Hi, When trying to upgrade from Samba 3.6.25 on FreeBSD 10.3-RELEASE-p17 to Samba 4.7.6 on FreeBSD 11.1-RELEASE-p6, I receive an error: # samba-tool domain classicupgrade --dbdir=/usr/local/etc/samba3/ --realm=samdom.example.com --dns-backend=BIND9_DLZ /usr/local/etc/samba3/smb.conf [...] Committing 'add users' transaction to disk Adding users to groups Committing 'add users to
2018 Apr 04
1
uncaught exception - Unable to get id for sid in classicupgrade
On Wed, 04 Apr 2018 15:13:09 +0700 Olivier via samba <samba at lists.samba.org> wrote: > Hi, > > When trying to upgrade from Samba 3.6.25 on FreeBSD 10.3-RELEASE-p17 > to Samba 4.7.6 on FreeBSD 11.1-RELEASE-p6, I receive an error: > > # samba-tool domain classicupgrade --dbdir=/usr/local/etc/samba3/ > --realm=samdom.example.com --dns-backend=BIND9_DLZ >
2014 May 19
1
need help cleaning up my smb3 databases to complete smb4 classic upgrade
Hi, Getting straight to the point: /usr/local/samba/bin/samba-tool domain classicupgrade --dbdir=/root/elara/samba/ --use-xattrs=yes --realm=mycompanyname.com.pl/root/elara.smb.conf After cleaning up all duplicate names and sutch I end up with: ldb: ldb_trace_request: (tdb)->search ldb: ldb_trace_response: ENTRY dn: CN=CONFIG cn: CONFIG upperBound: 4000000 lowerBound: None xidNumber: None
2008 Jun 13
6
Newbie question on has_many
I have two classes: a Widget and a User. The User has an id that is referenced in two places on the Widget: owner_id and operator_id. How should I structure that reference for has_many? Thanks folks - I appreciate any help on this. --David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2018 Jan 19
1
Leaflet maps. Nudging co-incident markers
I have a dataset showing points, with a category for each point and its location. I simply want to display my points, in a way that users can toggle the points on and off by category. Where I have two objects in the same category I'd like to display them nudged to appear as two distinct, but very close points. I have made reproduceable example (the places are not real), which is loosely
2006 Jul 18
2
how to generate calculated db fields
I''m trying to generate a "page slug" i.e. a url sanitized id from some text in my model that I want to be saved into the database and I''m not seeing how I can do it. The closest I''ve come to getting this to work has been... class Page < ActiveRecord::Base attr :name before_save :generate_slug def generate_slug self.slug = self.name.gsub
2006 Nov 16
0
rsync-ssh problem
I am having a real nightmare getting automated login with ssh to work; hoping someone can guide me. I am running Ubuntu 6.10. I have a main machine (called greywolf) which has a partition for my /home on it. I am doing backups to an extrnal usb drive attached to a Linksys NSLU2 (called slug) running UnSlung firmware. All hosts, networking, shares, firewall & such stuff is working fine.
2010 Aug 19
1
has_many :through question
I am trying to create an association table using the ":through" option in "has_many" but not having success. I have created the necessary migrations of the association tables and run rake db:migrate I have the following model: class Group < ActiveRecord::Base has_many :users, :through => :group_user has_many :invites, :through => :group_invite, :class_name =>
2006 May 05
0
Small design problem
Hi, I''ve got a page with galleries. Everything works quite ok. But now i need to create a special gallery that will be used only to randomly display images on the home page. The main difference between this and the other galleries will be that it won''t have description and title like the others and its images won''t have their thumbnail versions. Admin
2006 May 14
4
searching on foreing keys
Hey all, I''m using a simple search function. It''s working great except for foreign keys. I have one table pets (id,name,owner_id) and another table people(id,name) owner_id being a foreign key of pet pointing to people name. here it is on the pet controller: @paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id like
2006 Jun 20
1
R galleries
Hello! I just noticed new link on R wiki on R galleries and wanted to share this info with YOU! - R graphical manuals (this is awesome page as there are all help pages of all packages on CRAN and probably even more and all graphics examples are displayed! - more than 8000 images!) http://bg9.imslab.co.jp/Rhelp/ This is a very nice addition to already existing R graph and movies galleries - R
2006 Feb 25
2
Ruby Interface Recommendations Photo Gallery Creation?
Hi, I''m looking to create a gallery index page of thumbnail images which point to their associated images galleries. Also, I would like to organize the images from left to right and top to bottom. Furthermore, I would like to limit the number of thumbnail images on the page. I guess that I''m needing some type of horizontal looping interface for both the thumbnail index page
2013 Mar 19
1
samba-tool classicupgrade (from v3 to v4) aborts with "Unable to get id for sid"
I'm trying to upgrade from samba3 -> 4. I ran this command: WORKDIR=/usr/local/mobius /usr/local/samba/bin/samba-tool domain classicupgrade --dbdir=$WORKDIR/var --use-xattrs=yes --realm=infinityhealthcare.com $WORKDIR/smb.conf but it failed with the error given in this email's subject. What does it mean, and how do I fix it? This is just another is a growing line of errors that
2003 Nov 26
3
Fair queueing: SFQ vs TBF
Hello, I have one Q. What is better when using as leaf in one leaf with several hosts (like subnet) to splice traffic equaly to user number? Like 2 users = 256/2, 3 = 256/3 and so on. WRR was pretty good for this job, but it''s only for 2.4.21 kernels and mine''s 2.4.22. So what is better: SFQ or TBF? -- Artūras Šlajus _______________________________________________
2005 Mar 05
3
routes inconsistency?
Hello, As a small excercise in learning rails, I''ve been porting a very simple website from SSI to rails (yep, a bunch of static files that were previously served with a tiny bit of SSI magic are now served by a database-backed rails, it''s total overkill, I know). Part of the reason is that I''m trying to move from apache to lighttpd, and lighttpd''s SSI for