Displaying 20 results from an estimated 209 matches for "sussers".
Did you mean:
susser
2006 Jul 28
11
Forum
Im making forum and i have problem with paths.
Here is code:
http://pastie.caboo.se/6389
With this code, it works. But its a bit weird to use so many paths
function. For every path i need to make new function. So can you suggest
me something.
Tables are like here:
http://wiki.rubyonrails.com/rails/pages/ForumExample
--
Posted via http://www.ruby-forum.com/.
2006 May 28
7
Join table not being populated
Hello,
I have the usual Categories and Products table scenario, mediated by a
Categories_Products join table. When I create a new Product and into a
given Category, I notice that my join table is not being populated.
Shouldn''t the join Categories_Products table be populated?
Thanks,
gk
--
Posted via http://www.ruby-forum.com/.
2007 Dec 12
7
Release Retrospective
First off, congrats to everyone for getting Rails 2 released. A lot
of work went into the release, and it''s good to see us reach this
milestone. And now that the release dust has settled, I think it
might be useful for us to have a retrospective and evaluate how the
release went.
I think the Ruby on Rails project has improved a lot this year, and
this is another opportunity
2006 May 21
3
has_many :through with a polymorphic join
Hi,
Four tables: users, user_counties, uk_counties and us_counties.
Each user has many counties, and each county has many users, so I
decided to make user_counties a polymorph, so it can have counties
from different countries (each country requires a completely different
set of tables with a completely different set of properties, that''s
why there''s one table for uk_counties and
2006 May 10
7
has_many :through scope on join attribute
Hi
I have a has_many :through. It''s a basic mapping of
Project
id
....
User
id
....
TeamMembers
project_id
user_id
role
What I would like to do is have different roles so I can have in the project
model
has_many :core_members, :through => :team_members, :source => :user
but I would like to limit this to only those with the "core" role in the
team members table for
2006 Apr 05
5
Updating attributes in HABTM association
Hi,
I am trying to find a way tp update attributes in a habtm association. I
am trying to use the code from ticket #2462, but as my
association_class_primary_key_name seems to be empty the generated sql
code is corrupt. I hope thats not a problem of my model that this
variable is empty.
What would you recommend to update those attributes (rails 1.1)
THANKS!!!
--
Posted via
2006 Apr 20
3
has_many :through with has_many/has_many join models
It seems that using a join model that joins with two has_many''s will
fail to generate proper SQL
class StudentSemesterRecord < ActiveRecord::Base
belongs_to :semester
has_many :discipline_records, :through => :semester
end
class Semester < ActiveRecord::Base
has_many :student_semester_records
has_many :discipline_records
end
class DisciplineRecord <
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table
has another "non-joiny" attribute.
I went from this:
has_many_and_belongs_to :jobs, :join_table => ''tablename'',
:foreign_key => ''x'',
:association_foreign_key => ''y''
to this:
has_many :jobs, :through =>
2006 Mar 29
4
:through alternate
I''d like to use :through to create a web of associations like:
class Thing < ActiveRecord::Base
has_many :child_things, :through => :thing_thing
has_many :parent_things, :through => :thing_thing, :some_other_option?
end
class ThingThing < ActiveRecord::Base
belongs_to :thing
belongs_to :child_thing, :class_name => ''Thing'', :foreign_key =>
2006 Jun 01
4
What i do if i have a table with a column named "type"?
Hi everybody!
The class ActiveRecord::Base have a atribute named type and if my
table have a column with the same name i get an error if i use
model.finde, model.save and more...
I dont know what i can do to solve this problem!
Someone know?
Thanks
--
_________
Noel R. Morais
2006 Jun 01
3
Newbie: HABTM problems
I''m new to RoR and trying to make a HABTM relationship work. I have
no problems with displaying the fields (after I pumped the data into
MySQL manually outside of RoR), but when I try to edit a record, it
=does= save the changes in the primary record, but =not= the join
table. When I look in the development log, I see the update to the
main table, but nothing about the join
2006 Mar 28
5
Rails 1.1 released
I haven''t seen a note here on the list, so in case anyone doesn''t
have their RSS reader glued to the relevant blogs...
http://weblog.rubyonrails.org/articles/2006/03/28/rails-1-1-rjs-
active-record-respond_to-integration-tests-and-500-other-things
Congrats to David and all the core team, and thanks for your
dedication and all the work. This release looks really solid and
2006 Aug 12
7
Collection assignment to a has_many :through
I''m working on a simple photo gallery in rails, it seems to be a good
project for a newbie.
I have photos and categories, many-to-many association. It worked well
with HABTM. Then I decided that it would be good to be able to change
order of the photos so that thumbnail pages would look less chaotic.
So I created a Layout model which is a join model (or whatever it is
called) that
2006 Jul 15
2
find() with id array - can i preserve the ordering?
Sort of a newbie question - sorry if it''s been asked before and I missed it
in my search.
I have an id_array of Author ids, and I want to retrieve the associated
Author models as quickly as possible, but also preserve the ordering of the
id_array.
Using Author.find(id_array) returns the records, but not in the same order.
Is there some flag I can pass to find() to preserve the order? I
2006 Jun 27
3
Trunk or 1.1?
If you were launching a site in late September, would you be
developing with Rails 1.1 or on edge rails?
Joe
2006 May 23
2
has_many :through extra domain model question
If I have a model called Newsletter with:
has_many :subscribers, :through => :subscriptions
and wanted to list all the subscribers, but show what level their
subscriptions was (level is in subscriptions table), how would I best do
that?
Do I have to use my own select to get what I want or are the attributes
from subscriptions available to me through the join somehow (I am
suspecting not)?
2006 Jun 29
3
stylesheets
hi,
all
i have been playing around with rails for sometime,
i have seen most not all of the rails sites have similar look and feel (good
one)
i want to know how to use the stylesheets provided by the RoR framework if
any
or is it that we have to define on our own from scratch.
basiclly i need information regarding how can i make my view better
looking(the visuals)
Thanks in advance
warm
2006 Jun 08
3
Relationship and reflection
Hello,
I have a question.
I would like to know if there is a way with the reflection and
respond_to? to know if there is a relationship between tables.
When I say that I mean if inside a model there is a Has_many or
belongs_to declaration. Because I try to get this information
dynamically, during the execution of a script.
If someone has an idea even if it''s not with the reflection,
2006 Apr 21
3
polymorphic,has_many through can not work?
Josh Susser tells in his blog that the opposite direction of polymorphic
will get into trouble together with has_many through.
This is the url:
http://blog.hasmanythrough.com/articles/2006/04/03/polymorphic-through
I do that according to Josh Susser''s procedure:
class Tagging < ActiveRecord::Base
belongs_to :tag
belongs_to :taggable, :polymorphic => true
belongs_to
2006 Jul 05
7
HABTM join table has an "ID" column - is this an issue?
All,
I''m building model objects for existing tables that I cannot modify.
In AWDWR, Dave says "Note that our join table has no id column...The
second reason for not including an id column in the join table is that
AR automatically includes all columns from the join tables when
accessing rows using it. If the join table included a column called id,
its id would overwrite the id