[Rails] Re: real array via has_many

2016-05-28 Thread Zdravko Balorda
I think I found a solution: act_as_list. Sometimes we just need persistant storage. Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving ema

[Rails] Re: real array via has_many

2016-05-27 Thread Zdravko Balorda
Yes. So how one can handle arrays properly? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+u

[Rails] real array via has_many

2016-05-27 Thread Zdravko Balorda
The way to implement arrays in ActiveRecord is via has_many. But, normally Ruby arrays keep the order of elements, while has_many do not. This is not just a matter of "order by" clause. At every update one needs to index database table rows properly, so that "order by" would work. Thanks in advanc

[Rails] extending activeRecord with activeResource

2016-03-03 Thread Zdravko Balorda
How to extend ActiveRecord from database with additional columns from ActiveResource? I have an ActiveRecord class Person which I need to extend with columns from remote database which I can access with ActiveResource class Party. Can Party be seemlessly integrated into Person? Regards, Zdravko --

[Rails] ActiveResource and HTTP2

2016-02-24 Thread Zdravko Balorda
Hi, would/could ActiveResorce make use of HTTP2 sending just requests over and over again after making a connection to a server. This should save a lot of time. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: application playback module

2015-07-15 Thread Zdravko Balorda
Thanks! This seems very useful. For changes without going through Rails app, well I'm not sure when enough is enough. At db level one can not catch the current_user. But anyway this will do. Thanks, guys. Regards, Zdravko -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: application playback module

2015-07-15 Thread Zdravko Balorda
Hi! You've got there a few good points! I was hoping that playback could be based on requests only. More I think of it, it would need to save responses, too. To answer your questions: 1. Errors perhaps need not to be saved. Although, when everything is saved it may lead to a huge amount of space,

[Rails] application playback module

2015-07-14 Thread Zdravko Balorda
There are cases where we are required by law to be able to playback requests that have changed something in the database. Is there a module that can navigate through log history and show all pages that were submitted? Can it be done? Something that wraps arround controllers, saving Requests to data

[Rails] Re: SortHelper combined columns

2014-11-13 Thread Zdravko Balorda
I use SortHelper which provides for sorting by any column of the table. With patient name I would like to have only one column. The combined column could be 'name' as in: select ..., lastname||', '||firstname as name from patients... order by name This column does not appear in the table itself.

[Rails] SortHelper combined columns

2014-11-13 Thread Zdravko Balorda
Hi, I'd like to sort table of patiens with lastname, firstname in the same column. Of course in the model Patient there are two columns, which I need joined while sortable. Is there any way to do that with SortHelper? Regards, Zdravko -- Posted via http://www.ruby-forum.com/. -- You received t