I really like the new mime type handler however I was trying to convert some
code and couldn't figure out how.

My rails action was handle 2 formats, html and xml

      respond_to do |format|
        format.html # show.html.erb
        format.xml do
          if @account.active? && @account.valid_referer?(session[:referer])
            render :xml => @account.to_xml(:except => [:id, :created_at])
         else
            render :text => 'your account has been disable'
         end
       end

Now that I'm trying to switch this controller to Merb, I can't figure how to
have a custom xml builder and how to have a condition to the mime type
render.

Any help would be greatly appreciated.

Thanks

-Matt
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to