Displaying 3 results from an estimated 3 matches for "global_helper".
2009 Jun 15
6
Spork and Merb and rSpec
Andy Shipman wrote:
> When running spork on a merb application, whenever a spec is run I get
> the following error from the Spork server.
>
> /opt/local/lib/ruby/gems/1.8/gems/merb-core-1.0.11/lib/merb-core/bootloader.rb:1358:
> [BUG] rb_gc_mark(): unknown data type 0x3c(0x2203d0) non object
> ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-darwin9]
>
> Which crashes the
2007 Jul 15
0
errors_for
...le div on top.
Say I had an articles controller
def create
@article = Article.new(params[:article])
@article.save!
redirect article_path(@article)
rescue
render :action => ''new''
end
I would catch the activerecord exception there with the rescue
Then in global_helper.rb, I add the error_messages_for method. This
is taken from rails and stripped of some of its pieces like
content_tag and pluralize. I''m sure more of it could be cleaned up if
you wanted to.
def error_messages_for(*params)
options = params.last.is_a?(Hash) ? params.pop.symboli...
2007 Jan 03
2
Using helpers...
...am running version 0.0.8
module Merb
module FredHelper
def blee( args )
....
end
end
end
In the xerb template I have
xml.bobo blee( args )
At runtime I am getting undefined method ''blee''
I tryied moving blee to global_helper as well but no dice....
What am I missing ?
Regards,
Fernand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070103/8e6f2d15/attachment-0001.html