Activity Graph

Page 1 of 1


[17:30:04] marcules: has joined #RubyOnRails
[21:37:54] marcules: Quit: Leaving


[01:46:09] marcules: has joined #RubyOnRails
[06:14:41] marcules: Ping timeout: 265 seconds
[12:27:47] marcules: has joined #RubyOnRails
[12:27:50] marcules: Remote host closed the connection


[21:32:27] marcules: has joined #RubyOnRails
[22:19:04] marcules: Ping timeout: 264 seconds


[13:47:09] marcules: has joined #RubyOnRails
[13:55:50] marcules: Quit: Leaving


[01:10:35] marcules: has joined #RubyOnRails
[04:06:28] marcules: Quit: Leaving


[20:42:16] marcules: has joined #RubyOnRails
[21:52:10] marcules: Quit: Leaving


[12:39:30] marcules: has joined #RubyOnRails


[12:32:08] marcules: has joined #RubyOnRails
[14:33:10] marcules: *.net *.split
[14:36:43] marcules: has joined #RubyOnRails
[19:32:14] marcules: Ping timeout: 260 seconds


[07:35:31] marcules: has joined #RubyOnRails


[13:48:34] marcules: has joined #RubyOnRails
[13:48:39] marcules: has joined #RubyOnRails
[13:48:39] marcules: Changing host
[20:18:22] marcules: Ping timeout: 260 seconds


[11:22:07] marcules: has joined #RubyOnRails
[11:23:03] marcules: Read error: Connection reset by peer
[11:23:23] marcules: has joined #RubyOnRails
[11:24:07] marcules: Client Quit


[01:06:50] marcules: has joined #RubyOnRails
[07:31:37] marcules: Ping timeout: 268 seconds
[07:57:51] marcules: has joined #RubyOnRails
[08:11:01] marcules: Read error: Connection reset by peer


[13:30:25] marcules: has joined #RubyOnRails


[17:17:46] marcules: has joined #RubyOnRails
[17:26:02] marcules: Ping timeout: 244 seconds


[01:17:21] marcules: has joined #RubyOnRails
[12:33:32] marcules: Ping timeout: 260 seconds
[12:54:29] marcules: has joined #RubyOnRails
[21:09:21] marcules: Quit: Leaving


[11:13:54] marcules: Can I add a method to my model, and then use this method like any other property, like: def smallest_calculating_price end --> :smallest_calculating_price
[11:15:34] marcules: I have a model with "price", "price on sale", "price range (lower)" and "price range (higher)" --- I'd like to have a definitive answer (for sorting purposes) which is the currently smallest price in this model; like I want to use it in sunspot also @universa1
[11:16:32] marcules: What's cadbury? :D
[11:35:27] marcules: universa1: I just figured it out, I could define a new field in searchable, and append a do block, which calls my method
[11:36:33] marcules: searchable do integer :smallest_price do smallest_price end end @universa1


[20:04:34] marcules: hmmm... if I wanted to return hits with sunspot/solr which are not matching, how would I best go about it? I'm trying to first match "good matches", and then "everything else" from that category -- should I just first search with sunspot, fetch the id's and concatenate the missing items, in default order?
[20:07:11] marcules: I'm pretty new to rails - only started working with it beginning of last week... I'll look at it, but probably won't know what's wrong


[10:31:01] marcules: Which gem would you guys use for a fulltext search on ActiveRecord models? sunspot?
[10:34:54] marcules: hmm hmm so many options :D
[17:14:14] marcules: If I destroy an ActiveRecord instance, which is related to another instance, over a join table; is the entry in the join-table also being removed?
[17:19:49] marcules: Sharcho: I have a many-to-many relation; so when I use dependent: :destroy on has_many :item_categories_items it will not propagate to :item_categories unless I have a second dependant-declaration in the join-model, right?
[17:20:04] marcules: Hi mikecmpbll ! :)
[17:21:12] marcules: No I mean - I don't want it to propagate; so I assume I would be safe with only one; I'll test it now :D
[17:28:49] marcules: hmm odd.. I think rails appends a "." where there shouldn't be one while executing the delete statement
[17:39:38] marcules: Did I mess up with my many-to-many relation? I get an exception when deleting Items (the SQL statement is corrupt, it's missing the column name (item_id) -->
[17:41:51] marcules: yeah; but I'll try again
[17:41:57] marcules: Also I did not forget to restart delayed_job
[17:48:03] marcules: rhizome:
[17:51:13] marcules: rhizome: previously I also had this in line 41: ItemCategoriesItem.destroy_all(item_id:
[17:51:23] marcules: but I could try that, sec
[17:53:40] marcules: rhizome: still getting: SQLite3::SQLException: no such column: item_categories_items.: DELETE FROM "item_categories_items" WHERE "item_categories_items"."" = ?
[17:53:56] marcules: he just doesn't build the right sql query... strange
[17:58:21] marcules: hmm rhizome I'll ignore it for now and come back to it if I have the time; thank you anyways :)



[16:17:23] marcules: I have kind of a... database... or... rather "logic" related problem; I'm trying to save items, which belong to item_categories, into item_categories.items; BUT I also want only one request for all available subcategory-items; so I'm populating all parents recursively while saving a subcategory and adding the new items to the parents this way. Only problem now is, that I have to also remove old items, which are no longer neede
[16:17:38] marcules: diff_items = (old_items - new_items) isn't working anymore; illustration:
[16:17:42] marcules: any ideas? :D
[16:19:48] marcules: A subcategory is a category
[16:20:31] marcules: A non-sub category has no (or rather a "root") parent_id
[16:24:29] marcules: mikecmpbll: basically I'm trying to get all items, from my category and all its subcategories; but I wanted to do it with only one db lookup, so I'm trying to find a way of populating the parent categories with the items from the subcategories; the problem is - the parent categories themselves can have items, which are unrelated to the child categories, so my check for "old items" fails at that point
[16:26:01] marcules: mikecmpbll: I'm getting the item descriptions from another system, and have to deduce which items are no longer valid from the missing items of that service
[16:27:02] marcules: So if a subcategory has [a, b, c] and is updated to [a, c, d] - b should be purged from the database
[16:28:39] marcules: Yes, because if subcategory a contains 100 items, and subcategory b contains 100 items, category A contains 200 items -- but if you try to add 100 items to category A it does not however contain 300 items but is reduced back to 100 items, because it cannot check if the items are valid or not because the foreign system only delivers items for that category and not its subcategories
[16:29:18] marcules: It's... convoluted
[16:29:50] marcules: jhass: it does
[16:30:21] marcules: currently it's only on the sqlite development db
[16:31:23] marcules: mikecmpbll: basically yes
[16:32:06] marcules: invalid is the difference from the current model: invalid_items = (old_items - new_items) where old_items and new_items are arrays of old and new items
[16:33:45] marcules: yeah no :D - the problem only exists in the upper layers of categories; if you look at the bottom most subcategory, your approach works
[16:34:13] marcules: but a parent category can have items of its own, in conjunction to its child category items
[16:34:45] marcules: if the parent has all items from all subcategories, and recieves an updated list of items itself, it would remove the subcategory items
[16:35:23] marcules: I recieve it per category basis
[16:36:25] marcules: maybe it's just a retarded idea to propagate the item-creation upstream to the parent categories, and I should just do more db lookups on retrieval
[16:38:33] marcules: mikecmpbll: how'd you do that? The items are not restricted to a category, they can be in multiple categories
[16:49:53] marcules: mikecmpbll: processed_items would be.. the new items?
[16:50:57] marcules: yes also a item can be in a subcategory and its parent category
[16:51:50] marcules: because the service I'm retrieving from is very restricted
[16:52:01] marcules: I only get a couple of items for my requests, there is no "get all"
[16:54:40] marcules: mikecmpbll: I'm doing it whenever a category is being edited; and I had planned on doing it in a scheduler; but yes it's happening all in the same procedure
[16:56:40] marcules: Thanks anyways :)
[16:57:02] marcules: I think the problem is rather, that the API is not designed for what I have to do


[12:47:32] marcules: hi apeiros_ :)



[23:21:47] marcules: hmm.. how would I know the difference between %20 and + while accessing params?
[23:36:06] marcules: chridal, yes
[23:36:38] marcules: because + is also "space" for rails
[23:37:10] marcules: chridal, but I got around it; I'm now sending %2B instead of +
[23:37:58] marcules: ?tags=red%20hair+short%20hair <<< this would generate "red hair short hair" in the params chridal
[23:38:13] marcules: I'm now sending ?tags=red+hair%2Bshort+hair and all is good