[Rails] Re: Ruby on Rails IDE

2010-08-26 Thread stevo84
I do really recommend checking out RubyMine from JetBrains - it is designed specificaly for Ruby/Rails. Just give it a try and You will search no longer On Aug 24, 3:25 am, ZRiddick wrote: > Really strange that I cannot find a lot of discussion on a good RoR > IDE. Most of what I have pulled up d

[Rails] Re: Weird gsub behaviour

2010-02-19 Thread stevo84
No, I did not... and it sure works! I knew that it should be easier :) Thank You for another piece of knowledge, Rob and Xavier On 19 Lut, 16:08, Rob Biedenharn wrote: > On Feb 19, 2010, at 5:14 AM, stevo84 wrote: > > > The exact problem > > > a = '' >

[Rails] Re: Weird gsub behaviour

2010-02-19 Thread stevo84
Argh - slashes missing -> here is the pastie code -> http://pastie.org/832493 On 19 Lut, 11:46, stevo84 wrote: > It was received from already escaped html mixed with javascript - that > is why :( > I have no influence on the fact that these slashes are there... > > Anyway

[Rails] Re: Weird gsub behaviour

2010-02-19 Thread stevo84
quot;.gsub("b", str.gsub(/\&/o, '\\\&\2\1')) => a\&123c On 19 Lut, 11:27, Frederick Cheung wrote: > On Feb 19, 8:47 am, stevo84 wrote: > > > ruby 1.8.6 (2007-09-24 patchlevel 111) > > > str = '\&123' > > puts &quo

[Rails] Re: Weird gsub behaviour

2010-02-19 Thread stevo84
The exact problem a = '' b = '", str) => quot;inputs invoice_linequot;><ol>\n<li class=quot;string required invoice_line_namequot; id=quot;" On 19 Lut, 09:47, stevo84 wrote: > ruby 1.8.6 (2007-09-24 patchlevel 111) > > str = '\&123&

[Rails] Weird gsub behaviour

2010-02-19 Thread stevo84
ruby 1.8.6 (2007-09-24 patchlevel 111) str = '\&123' puts "abc".gsub("b", str) puts "abc".gsub("b", "#{str}") puts "abc".gsub("b", str.to_s) puts "abc".gsub("b", '\&123') puts "abc".gsub("b", "\&123") >ruby test.rb ab123c ab123c ab123c ab123c a&123c<--- This I want to achieve

[Rails] How to capture not eval'ed ERB

2010-02-18 Thread stevo84
Hello I need to capture a piece of erb by helper, modify it slighlty and render it back. Really simplified version below: def call_tag(tagname, *attrs, &block) content = capture(&block) concat render(:inline => process_content(content) :layout => false) end However if content contains

[Rails] Re: How to add after_filter-style render

2009-07-14 Thread stevo84
S_FOR_MB}');new Effect.Highlight('messages'); " end result end alias_method_chain :render_for_text, :flashes end end On Jul 14, 10:13 am, stevo84 wrote: > Hello > > I would like to execute specific action rendering something into page > after each

[Rails] How to add after_filter-style render

2009-07-14 Thread stevo84
Hello I would like to execute specific action rendering something into page after each of my ajax calls. In example I would like to update some div or display an alert. How I imagine it could work is as follows class ApplicationController < ActionController::Base after_filter :do_something_af

[Rails] Re: passing blocks to partials

2009-02-28 Thread stevo84
Solved I've changed <%= optionals.call(user) %> to <%= with_output_buffer {optionals.call(user)} %> and now it works Probably if I knew how to pass params (user) to capture helper, I could use that instead On 28 Lut, 21:14, stevo84 wrote: > Hi > I&#

[Rails] passing blocks to partials

2009-02-28 Thread stevo84
Hi I've got following problem: I am attempting to write helper that will display table (stored in partial) with some custom last column contents. I would like to call it like <% parametrized_users_list(@users) do |user| %> <%= user.id %> <%= user.created_at %> <% end %> where user.id and