Re: [Rails] Re: variable symbol

2012-07-03 Thread Aleksey V Zapparov
On Tue, 3 Jul 2012 14:07:37 +0100 Michael Pavling wrote: > On 3 July 2012 13:04, Aleksey V Zapparov wrote: > > I don't speak Deutsch, but I guess I understood you. Sorry it was my > > mistake (copy-paste is evil): > > > > us.bslnk.send :"#{tst}=" false

Re: [Rails] Re: variable symbol

2012-07-03 Thread Aleksey V Zapparov
^ > --- > > iwie tut das nicht :( > I don't speak Deutsch, but I guess I understood you. Sorry it was my mistake (copy-paste is evil): us.bslnk.send :"#{tst}=" false -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34

Re: [Rails] variable symbol

2012-07-03 Thread Aleksey V Zapparov
send `:d1=` symbol, so correct call is: tst.send :"#{a[0]}=" = "hello" -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@jabber.ru *Origin: Happy Hacking! signature.asc Description: PGP signature

Re: [Rails] variable iteration

2012-07-02 Thread Aleksey V Zapparov
t so much! > > basti > Basically `test.d1` in this case is just a message. So you can call it like: `test.send :d1`, or in your situation: `test.send var.to_sym` -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@jabber.ru *Origin: Happy Hacking! signature.asc Description: PGP signature

Re: [Rails] Drop-down menu help

2012-06-25 Thread Aleksey V Zapparov
['Peas','Butter','Garlic'].map{ |v| [v,v] }) And after all, I guess you better use `select` helper on a form builder in your case: <%= f.select(:name, options_for_select(...)) %> -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@jabber.ru *Origin: Happy Hacking! signature.asc Description: PGP signature

Re: [Rails] Non-field validation in rails with mongodb

2012-06-24 Thread Aleksey V Zapparov
DB not mysql... ParseError: failed understand question from /ixti/head in `' Can you explain (probably with examples) what are you going to get? -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@j

Re: [Rails] Modal popup in rails

2012-06-24 Thread Aleksey V Zapparov
onality. It's a client-side JavaScript. As you are using jQuery, dig information here: http://twitter.github.com/bootstrap/javascript.html#modals http://jqueryui.com/demos/dialog/ -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage

Re: [Rails] how to use model withour database

2012-06-21 Thread Aleksey V Zapparov
introduction: http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/ -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@jabber.ru *Origin: Happy Hacking! signature.asc Description: PGP signature

Re: [Rails] help with design issue

2012-06-20 Thread Aleksey V Zapparov
e logic in it?? or can i transfer some logic to > helpers? What would be the ideal design in this case? I think you need a separate model that will aggregate data from others. -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.

Re: [Rails] Re: Equivalent to trim() PHP

2012-06-20 Thread Aleksey V Zapparov
://www.ruby-doc.org/core-1.9.3/String.html#method-i-strip Basically, PHP's trim() works the same. If you want to remove whitespaces inside the string, you need to use `String#gsub` or `String#squeeze` (depending on what you want to achieve). -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF

Re: [Rails] Re: How to get password from database using devise

2012-06-20 Thread Aleksey V Zapparov
end a message to the user that his account was created with such and such login and pass. -- Sincerely yours, Aleksey V. Zapparov A.K.A. ixti FSF Member #7118 Mobile Phone: +34 677 990 688 Homepage: http://www.ixti.net JID: zappa...@jabber.ru *Origin: Happy Hacking! signature.asc Description: PGP signature