Displaying 20 results from an estimated 10000 matches similar to: "Question about ERB performance"
2011 May 26
8
Is there a way I can create a sub-layout with ERB?
I have 2 pages that have almost the same content except for stuff in
the middle. I''d basically like to have a sub-layout that wraps the
content that is different - exactly the way a normal layout file
would.
How can I call into a layout inside of erb? I''d like to do something
like this:
<%= render :sub-layout => "reusable-wrapper" %>
2011 May 27
14
[rails] undefined method `model_name' for NilClass:Class
Never seen the error above before, code:
describe "edit action" do
it "edit action should render edit template" do
food = Food.create(:name=>''mooo'') #
Food.any_instance.stubs(:valid?).returns(true)
get :edit, :id => food.id
response.should render_template(:edit)
end
end
-------------- next part
2013 Mar 13
3
Help me about Test-Unit in Ruby on Rails
I''m using RubyMine for developing RoR and i found in RubyMine have Test
file.But I read in rubyforge http://test-unit.rubyforge.org/ have
Test-Unit for RoR.Could you help me about 2 problem:
- how is different between RubyMine Test-Unit and Test-Unit in rubyforge
- how can i run Test-Unit with Test-Unit in rubyforge(test-unit github:
https://github.com/test-unit/test-unit.git)
2011 Mar 28
2
how to use ruby mine
i installed ruby mine 3.0.1 version.,
installed gems cucumber
need to use cucumber and ruby with rubymine
can u guide me for that
thanks
sri
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send
2010 Jul 02
17
Doesn't work erb engine
I''m new in RoR:)
I have controller and view (/app/controllers/greeting_controller.rb
and /app/views/greeting/index.rhtml /.erb/.html.erb - doesn''t match).
greeting_controller.rb source:
class GreetingController < ApplicationController
def index
@message = "Hello world!"
end
end
index.rhtml source:
<html>
2009 Dec 10
6
(annoying) question: Netbeans vs Rubymine
Hi,
I''m don''t want to start another post about what''s the best IDE. Am just
considering getting a licence for Rubymine which is 99$ I think. But I don''t
know whether it''s really better than Netbeans. My focus is on BDD with
cucumber, Rspec and Shoulda. Can anyone tell me his/her experience concering
test support in those two IDE''s
2008 Apr 12
1
index.html.erb
Hi Everyone,
A newbie question, I have my subdomain pointing to th respective
app/views folder however the browser does not default to the
index.html.erb , so instead I just have file listing. When I click on
the index.html.erb it does work fine. What do I need to do to get it to
work so it automatically load when a user goes to that view folder.
Thanks in advance
Using ROR 2.2
--
Posted
2008 Dec 19
14
Can duplicate "back" browser function in Rails?
In Rails I have a DB Table index.html.erb view. It has 100''s of items.
When I gen via scaffold I get index, show, edit, update, etc view.
But when I page down several pages, use the "show" link and then the
"back" link I do not go back to where I was on the index view.
Instead, I go back to the TOP of the index not the place where I clicked
on the "show"
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for
suppressing trailing newlines. Thus
erb -n script
gives errors. Where is Rails ERB so I can invoke it directly?
Thank you
Hugh
2011 May 21
2
How do you create a sub-layout or a partial that wraps a lot of custom html?
Basically I''d like to create a layout inside of a layout using erb.
Something like this:
<%= render :partial => ''support'' do %>
<div id="helpDocumentView">
<h3><%= @help_document.question %></h3>
<%= @help_document.content %>
<div id="helpDocumentHelpful" data-help-document-id="<%=
2011 Mar 08
6
RoR failure
I am a newbie at RoR and am disappointed by the fact that I couldn''t
install it in my Ubuntu 10.10 using an IDE. I tried NetBeans 6.9.1,
Eclipse 3.6.2, Aptana Studio and its plugin for Eclipse and RubyMine.
There was always a problem somewhere (rails, rubygems, rake, etc)
preventing me from working with my project. I currently have Netbeans
6.9.1 bundled with java jdk 1.6.0. I''ve
2006 Jul 29
6
why is webrick running in development mode?
Hi,
I changed my environmnet.rb to say PRODUCTION mode, however when I start
up a server "ruby scripts/server"
a) it runs in development mode (via the logs) - any ideas why?
b) why does webbrick run - I thought by default now it was supposed to
be lightty
Tks
--
Posted via http://www.ruby-forum.com/.
2007 Jan 19
4
Rendering with erb
Hi, I thought it would be fun to try to write a render method that
uses erb for rending. I''m not much of a programmer, but I still like
to try:
module Test
require ''erb''
def render(m)
ERB.new(IO.read("templates/layout.html")).result(binding) do
ERB.new(IO.read("templates/#{m}.html")).result(binding)
end
end
end
This
2006 Jul 25
3
about ERB sample
Hi list:
I run the ri''s ERB doc 1st sample
1. require ''erb''
2. x = 42
3. template = ERB.new <<-EOF
4. The value of x is:
5. EOF
6. puts template.result(binding)
the doc say it will print
"The value of x is: 42"
but my irb print "nil" and there is a
"=> #<ERB:0x2970b24
2005 Dec 08
7
Help shut down webbrick on mac?
Hello,
I just installed radrails and it will not run the webbrick because a
version is already running on my mac.
I do not know how to shut down the mac version.
Thanks
Regards,
Frank Rocco
farocco-H+0wwilmMs3R7s880joybQ@public.gmane.org
2006 Feb 07
4
__END__ equivalent for erb?
Time and time again I find the need to terminate evaluation of an erb
file on a certain line for debugging purposes, but can''t figure out a
way to do it. Is this possible?
Thanks!
John
--
Posted with http://DevLists.com. Sign up and save your time!
2007 Sep 28
2
RoR uses something rather than erb or eRuby?
it seems that RoR doesn''t use erb or eRuby to generate its output for
rhtml?
the program erb and the description of eRuby at
http://www.eruby.info
both said that
<% print "foo bar" %> or <% puts "hello" %>
will be placed into the output...
but currently for RoR, it won''t...
only <%= expr %> is doing it and it cannot be print or
2012 Oct 10
1
Rubymine Install Missing Gems
Hello All,
I am using JRuby in Linux Ubuntu 10.10.
In Rubymine IDE, I am getting as "Install Missing Gems" link. After
clicking on that link, I am getting this error :-
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.
checking for pg_config... yes
Using config values from /usr/bin/pg_config
2006 Apr 25
5
markaby or erb?
Guys,
We''re embarking on a new dev project, and I''m curious....why would one
choose markaby over erb? I for one am no fan of the erb syntax, but
aside from that it''s similar to other technologies I''ve used in the
past: PHP, JSP, ASP, etc.
Why would one choose markaby over erb? What are the benefits? What are
the drawbacks? Is there anything remarkable
2012 Apr 24
3
How to increment variable in erb template ?
Hi'',
I''m looking for a way to increment variable in template (erb file).
I tried this, but it didn''t work
Compteur <%= compteur %>
> <% compteur = compteur + 1 %>
> Compteur <%= compteur %>
>
I''ve got this error :
> Error 400 on SERVER: Failed to parse template test/test.erb: undefined
> method `+'' for