Hi all,
In a sample project, I have a nested resource called ticket, and parent
resource called project.
rake routes:
...
project_tickets GET/projects/:project_id/tickets(.:format)
{:action=index, :controller=tickets}
POST
Frederick Cheung wrote in post #1034554:
On Dec 1, 11:28am, Vogon Primo li...@ruby-forum.com wrote:
POST /projects/:project_id/tickets(.:format)
It invokes the show action and not the index action. Why?
It's also doing weird stuff because it hasn't picked a project_id from
the url
thiagocifani wrote in post #1034560:
in your path are you sending the project object as params?
2011/12/1 Vogon Primo li...@ruby-forum.com
root :to= 'projects#index'
Ruby on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from
Vogon Primo wrote in post #1034547:
Hi all,
In a sample project, I have a nested resource called ticket, and parent
resource called project.
rake routes:
...
project_tickets GET/projects/:project_id/tickets(.:format)
{:action=index, :controller=tickets
Hi all,
In a legacy 'immutable' schema I have MTI inheritance setting:
TABLE systems
idPK ( NOT database generated)
installation_date
manufacturer
serial_number
TABLE lifters
idPKFK ( NOT database generated )
max_weight
drive
In my model I have implemented the semantic of inheritance between
Matt Jones wrote in post #1021972:
On Sep 13, 5:27am, Vogon Primo li...@ruby-forum.com wrote:
In a legacy schema sometimes we may discover foreign key constraints
that don't follow the simple FK references PK rule, but FK references
UNIQUE column rule. Is there a way to mapping
In a legacy schema sometimes we may discover foreign key constraints
that don't follow the simple FK references PK rule, but FK references
UNIQUE column rule. Is there a way to mapping this with :foreing_key=
... or some other mechanism with ActiveRecord?
--
Posted via
Suppose that in legacy schema,that you are working on getting
ActiveRecord to work with, you aren't keeping all the information about
user, with the user's main information in the users table, but in a
separate table.
For example:
table users
user_id
firstname
lastname
table auth_info
Has ActiveRecord a macro style method for mapping collections of value
objects? something like composed_of (used for one value object) but for
a collection of value object.
A second question:
Does ActiveRecord use .eql? to check instances for modifications?
Thank you
___Vogon
--
Posted via
Frederick Cheung wrote in post #983171:
On Feb 22, 4:23pm, Vogon Primo li...@ruby-forum.com wrote:
Has ActiveRecord a macro style method for mapping collections of value
objects? something like composed_of (used for one value object) but for
a collection of value object.
A second question
Hi guys,
Has ActiveRecord 3 a more complex cache mechanism than version released
with Ruby on Rails 2.0 ?
And has ActiveRecord the concept of scope of object identity?
obj1 = MyModel.find(1)
obj2 = MyModel.find(1)
results in two selects and two different object in memory, why?
Where I could
Hi guys, I'm trying to figure out how to chain together group and
select, two finder methods in ActiveRecord 3.x so I have this
model
class Cow ActiveRecord::Base
set_table_name :cows
belongs_to :farmer
end
with breed:string and milk_quantity:integer columns and in client
code:
result
Hello guys, I have these models
class Farmer ActiveRecord::Base
has_many :cows
end
class Cow ActiveRecord::Base
set_table_name :cows
belongs_to :farmer
end
...
graph = Farmer.find(x) # Retrieves four cows of x
graph.cows[1].name = Trottolina
graph.save
while
Thanks for reply Frederick, What I wrote is really obscure, so let me
explain:
replacing the name 'graph' with farmer, imagine a situation where in
the
database there is a record that I retrieve with :
farmer = Farmer.find(2)
Well, this farmer has many cows associated, and these cows are
Richard Ramsden wrote in post #975325:
Hey Vogon,
You should check out the autosave feature in ActiveRecord. I think this
is
what you're looking for :)
http://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.html
Cheers,
Richard
On Sun, Jan 16, 2011 at 11:08 AM, Frederick
15 matches
Mail list logo