Displaying 7 results from an estimated 7 matches for "larik".
Did you mean:
larin
2006 May 22
3
STI, HABTM & counter_cache
Hello world...
I have an interesting issue that the online docs aren''t helping me with.
In my app I have 4 models
Item < ActiveRecord
Deal < Item
Product < Item
Category < ActiveRecord
Item has_and_belongs_to_many :categories...
On each category record I''d like to maintain a product_count and deal_count
to increase performance. This doesn''t appear
2005 Dec 22
1
How to write unit tests with respect to model callbacks?
...@client.save, @client.errors.full_messages.join("; ")
@client.reload
assert_equal "TEST UPDATE DESCRIPTION", @client.description
end
def test_destroy
@client.destroy
assert_raise(ActiveRecord::RecordNotFound) { Client.find(@client.id) }
end
end
larik@somehost $ ruby test/unit/client_test.rb
Loaded suite test/unit/client_test
Started
.EE
Finished in 0.577375 seconds.
1) Error:
test_destroy(ClientTest):
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occur...
2006 May 05
1
Adding methods to model based on foreign table rows
...>> Product.color
=> "transparent"
or
>> Product.color = "red"
where saving/retrieving the "color" method saves/retrieves the values
to/from ProductProperties.
Is this possible, and if not what is the best place to start coding?
--
Sincerely,
Frodo Larik
2006 May 22
5
download manager?? anyone?
Hello all,
i have been searching for some time now on how to upload files and then
display them to be downloaded, haven''t had any luck. it seems all the
documentation is for uploading and displaying pictures. is this the same
thing? i''m lost... any help would be greatly appreciated.
Jon
--
Posted via http://www.ruby-forum.com/.
2006 Jan 09
0
Saving or updating multiple models
...hing is, when I do things like:
@worker.person.save
@worker.save
than the @worker doesn''t get saved because it doesn''t know the
@worker.person_id .
How to save multiple models from one controller respecting callbacks (
before_save, before_create, etc...) ?
--
Sincerely,
Frodo Larik
2005 Dec 27
1
SOAP + HTTP authentication
Hey,
Just had a question. Been pulling out my hair all weekend trying to get SOAP
to work properly in Rails and even straight on Ruby. I started with Rails''
AWS and moved to Ruby''s internal libraries, after which I tried out SOAP4R.
Now, my question is, does Rails or even Ruby itself support SOAP client
calls through basic HTTP Authentication? From the research I''ve
2006 Jun 08
2
counter_cache is not looking for children_count with acts_as_tree
Hi there, the acts_as_tree API says that I can set a counter cache and
that it will automatically increment the "children_count" column. I
did that but when I create a new page it asks for a "pages_count"
column instead.
Here is the relevant part of page.rb model:
class Page < ActiveRecord::Base
acts_as_tree :order => :position, :counter_cache => true