Displaying 20 results from an estimated 500 matches similar to: "Cleaning up has_and_belongs_to_many?"
2005 Sep 25
12
Browsercam.com Annual Membership
I have been using browsercam.com for CSS testing, but it is rather
expensive. Recently, I discovered others using funadable.org to
purchase a yearly membership as a group.
A year long membership at browsercam.com costs $480.00. This gives us
25 user accounts. I am proposing that 25 people throw in $19.20 for
their 1/25th share of the membership cost. Once I have raised $479.40
I will
2005 Mar 08
1
Updating Join Attributes
Other than doing a raw SQL update the only way to update join
attributes is to remove an object and then push_with_attributes
correct?
--
Lon
2006 Feb 27
1
Instance methods in runner?
I am having a devil of a time with some runner actions.
I can not seem to call any instance methods on found records.
Even when I strip is down to the basics:
def self.deliver
self.find(:all, :conditions => ["#{Message.table_name}.status
= ?", ''pending''], :include => [:site, :template]).each {|m|
logger.info m.is_recurring? # my method
logger.info
2006 Jan 23
1
[INFO] SMS Aggregators
Awhile ago, I posted some information about SMS Aggregators, this is
just a follow-up, based on changes in the US market.
As of January 31st, any commercial application, sending to US
networks, is required to lease a CSC (short code) from CTIA.
A CSC runs $6000/year for a random code, and $12,000/year for a
vanity code.
These charges are on top of the normal per message fees.
This does
2006 Feb 02
1
Grouping with tags or joins?
This more of a best practices question.
I''m implementing group functionality in a couple of applications.
The typical method, using HABTM, where you create a group and add
members, is typical.
For example, Users, Groups and Messages.
Does anyone prefer tagging instead?
Any advice would be great!
--
Lon Baker
http://www.speedymac.com
AIM: spdemac
2007 Feb 07
2
Would calling 3.am or 1130.pm be a useful way of getting a Time object?
Would "am" and "pm" be convenient and useful methods that Rails should
stick on top of the Numeric class?
So instead of calling Time.parse("23:30") to get a Time object at
11:30 PM, you could do 1130.pm instead.
Just trying to get an opinion before I create a patch, unit tests, etc
and try and convince someone to notice :)
Here are the methods if anyone wants to
2007 May 18
1
Informl 0.4 (wiki with forms, DB, and more)
We are pleased to make available an early-adopter release of our
open-source wiki, Informl. With Informl we are trying to do more than
you would normally expect from a wiki, by providing a framework in
which anyone can quickly create and deploy simple database-backed web
applications. Everything you need is at http://informl.folklogic.net.
Quick overview:
* General wiki features
* uses
2006 Jan 20
2
Creating thumbnail on the fly
I was doing some research about creating thumbnail images on the fly
after an image has been uploaded in a form, but for some reason it''s not
working for me. I''ve downloaded ImageMagick 6.2.5 for Mac but when I run
a test (identify image.gif) it gives me this error:
dyld: Library not loaded: /sw/lib/libjpeg.62.dylib
Referenced from: /Developer/ImageMagick-6.2.5/bin/identify
2006 Feb 07
11
Possible Rails Security Issue?
I have an e-commerce site and users check out with a form. The
results of that form are sent to a "confirm your order" page via
POST. I take great pains to NEVER store the full credit card number
on my server--just the last 4 digits. I was very surprised to find
that by default Rails will record POST requests with parameters in
the production.log. And those parameters
2006 Feb 21
26
Net::SMS::BulkSMS 0.1
This is the first release of a new Ruby library for the
www.bulksms.co.ukAPI which should allow simple integration of SMS
functionality into your
Ruby or Rails apps.
Sending a message is as simple as:
@service = Service.new(''username'', ''password'')
@service.send_message(''This is my message!'', ''4479123456789'')
# whats my
2005 Jun 24
14
apache2 fastcgi (fcgi) internal server errors, still :(
hi all,
I can blab, but here is a sample of my /var/log/apache2/error.log, it
has all the info:
any ideas what I can do prevent 500s from hitting my users? (besides
redirecting them with javascript to the same URL which will be fine on
the next request? :)
thanks,
_alex
[Fri Jun 24 12:30:45 2005] [error] [client 172.20.0.175] FastCGI:
incomplete headers (0 bytes) received from
2006 Aug 02
1
ActiveRecord: find_or_create with has_and_belongs_to_many --
I am attempting to use find_or_create on a foreign table with a
has_and_belongs_to_many relationship with my current table. I am doing
the following:
term = school.terms.find_or_create_by_code("FALL06")
the queries in the log show the expected SELECT statement to query if
there is a join table record between the school and term with code
"FALL06":
SELECT * FROM term
INNER
2006 Jun 15
1
has_and_belongs_to_many
My web server has a list of users, and each of them has a collection of
books. I want to save some certain number of books for each user,
including the book''s name, author, and display the information for the
user.
Which method should I use to store the subject information into each
user subject?
Do I have to create arrays to store it?
Thanks for help!
--
Posted via
2006 May 08
2
Queries with has_and_belongs_to_many relationship
I was able to create a has_and_belongs_to_many relationship for my app,
but now I''m not too sure how to write queries for it.
Basically, I have a table ''courses'' that has_and_belongs_to_many
''categories'' and vice versa
So I''m trying to figure out how I would find only the courses that
belong to a category that I specify.
Let''s
2006 May 26
0
has_and_belongs_to_many with fk constraints?
Hi folks,
I''m wondering if it''s possible to use foreign key constraints on the join
tables of a has_and_belongs_to_many relation. Specifically, I get this
error when I try and delete a model I''m using, named saved_search, which is
many-to-many with neighborhoods. Any ideas? Thanks for any help. :-)
-Eric
Code:
@saved_search.destroy
Error:
Mupdate or delete on
2006 Apr 01
3
has_and_belongs_to_many construction
Hi there,
I''ve got a table construction like this:
presentation contactstate
Hilton new
Mc Donalds emailed
etc. called
visited
etc.
Now i''ve created an join table presentationcontactstate with extra
fields like comment and date time. so i know for example when i called a
specific presentation.
Now
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?
2006 Apr 21
0
collection_select has_and_belongs_to_many update_attributes
I know there have been threads on this before but I was thinking
shouldn''t multiple collection_select automatically update habtm
relations when you update_attributes?
In order to get multiple collection_select to work I use:
collection_select(:user, :group_ids, Group.find(:all), :id,
:name,{},{:multiple=>'''',:name=>''group[id][]''})
In fact if I
2006 Mar 07
1
has_and_belongs_to_many tags
I''m trying to create a search where I can find pages by their tag name.
Here''s a sample of my code (not working).
@tags = Page.find(:all, :conditions => ["#{:tag.name} LIKE ?",''%'' +
@params[''searchtags''] + ''%'' ])
My enviroment:
I''ve got a table called tags, and a table called pages, both with a
2006 Mar 09
2
has_and_belongs_to_many -- how to create test fixtures?
Hallo -- can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
doug.
--
Posted via http://www.ruby-forum.com/.