Displaying 20 results from an estimated 100000 matches similar to: "What's difference between builder and template?"
2010 May 19
0
render html partial from atom builder
So I have an action that results in atom:
def index
...
respond_to do |format|
...
format.atom { render :layout => false}
end
end
Then I have a builder template to render the atom, called
index.atom.builder.
Inside this builder template, I''d like to render one of my existing html
partials, to put in the atom:content element, perfectly normal atom
thing to do.
2010 Aug 30
0
rails new --builder
When invoking rails new with the --builder option, I see that you have
to call the class ::AppBuilder. How can you
change the source_root for just a few of the methods?
I want to generate the gemfile from my own template
AppBuilder < Rails::AppBuilder
def gemfile
template ''Gemfile''
end
end
How can I change the Gemfile template from the AppBuilder and if I
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2.
Running rspec on it brings about a large amount of these messages:
DEPRECATION WARNING: Passing a template handler in the template name is
deprecated. You can simply remove the handler name or pass render :handlers
=> [:haml] instead. (called from block (2 levels) in <top (required)> at
2011 Mar 04
1
How to modify the template path for ActionMailer used in a Ruby script ?
I am testing a ruby 1.9.2 script (it''ll be run in a cron task
later...) in which I am trying to use ActionMailer
All my files are in a single folder ''joinus_email
- joinus_email
joinus_email.rb
notifier.rb
- notifications
joinus_email.html.erb
joinus_email.text.erb
running the script joinus_email.rb, (in which I defined the
2012 Sep 23
6
Missing template projects/index, application/index ?
Getting this issue...even though I have my views there in both the projects
and application. Also getting a routes issue "No route matches [GET]
"/projects" when going to projects when I have root :to => "projects#index"
defined in my routes file.
Any idea?
1) Creating Projects can create a project
Failure/Error: visit ''/''
2012 Nov 26
5
Missing template pages/layout only occasionally
I have my app email me errors when they occur. I get this about 2-3
times a week with thousands of hits a day to the site. pages/show is a
.html.erb file that renders the partial
_strategicrelationshipacademy.html.erb essentially. Or whatever partial
it calls for. I get this on many different ''pages''. Obviously the
partial exists if it renders it fine most of the time. What
2012 Sep 14
1
calling method on base intended to simulate initialize on instances?
class A
def initialize
setup_b
setup_c
end
def b_and_c
"#{@b} and #{@c}"
end
private
def setup_b
@b = ''b''
end
def setup_c
@c = ''c''
end
def setup_d
@d = ''d''
end
end
a = A.new
a.instance_variable_get("@b") # => "b"
a.instance_variable_get("@c") # =>
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following:
My Controller:
def new
.
.
@teammembers.each do |teammember|
request = @request_thread.requests.build(:recipient_id =>
teammember.user_id, :full_name => ''Billy Bob T'')
end
My View:
.
.
<%= f.fields_for :requests do |builder| %>
<div class="field">
<%= builder.label
2010 Jun 23
3
Custom default form builder in Rails 3
Hello everyone,
I am trying to set a default custom form builder.
I have defined my form builder class in "lib/mymodule/mybuilder.rb"
as:
module Mymodule
class Mybuilder < ActionView::Helpers::FormBuilder
......
end
end
Then I am trying to use this custom class in application.rb as
config.action_view.default_form_builder = Mymodule::Mybuilder. But I
get "Uninitialized
2010 Oct 24
1
Re: [Rails-core] Re: (Unable to start rails application) ruby scipt/server error
Rails application which i create manually like
rails new blog
and the content of the file "blog/config/boot.rb" are
require ''rubygems''
# Set up gems listed in the Gemfile.
gemfile = File.expand_path(''../../Gemfile'', __FILE__)
begin
ENV[''BUNDLE_GEMFILE''] = gemfile
require
2016 Jan 14
0
[PATCH 2/2] builder: allow a specific template for --list
Allow the user to specify a template in --list mode, which will be the
only result in the resulting output (instead of all the available
templates).
This makes it easier to find out the details of a specific template.
---
builder/builder.ml | 6 ++++++
builder/cmdline.ml | 3 ++-
builder/virt-builder.pod | 13 +++++++------
3 files changed, 15 insertions(+), 7 deletions(-)
diff
2017 Oct 05
0
[PATCH v11 3/6] builder: add a template parameter to get_index
get_index now gets a new template parameter. Setting it to true will
make the index parsing less picky about missing important data. This
can be used to parse a partial index file.
---
builder/builder.ml | 2 +-
builder/index_parser.ml | 26 ++++++++++++++++++--------
builder/index_parser.mli | 5 ++++-
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/builder/builder.ml
2010 Mar 01
1
Render - Missing Template
Sorry if you have had this problem many times before. I just can''t
seem to find the problem.
I have a budget controller with a create action like this:
def create
# do some things
if budget.save
redirect_to(period_budgets_path(period))
else
@budget = budget
@expense = budget.expense
@period = budget.period
render :action => "new"
2017 Sep 12
0
[PATCH v8 3/7] builder: add a template parameter to get_index
get_index now gets a new template parameter. Setting it to true will
make the index parsing less picky about missing important data. This
can be used to parse a partial index file.
---
builder/builder.ml | 2 +-
builder/index_parser.ml | 26 ++++++++++++++++++--------
builder/index_parser.mli | 4 +++-
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/builder/builder.ml
2017 Sep 18
0
[PATCH v9 3/7] builder: add a template parameter to get_index
get_index now gets a new template parameter. Setting it to true will
make the index parsing less picky about missing important data. This
can be used to parse a partial index file.
---
builder/builder.ml | 2 +-
builder/index_parser.ml | 26 ++++++++++++++++++--------
builder/index_parser.mli | 4 +++-
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/builder/builder.ml
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem
online:
I solved this by adding an .html.erb file for the "missing template", since
by design or bug Rails3 will not find or render another controllers view (in
my experience). Then in the new html.erb file, I just put <%= render
"comparisons/display" %> because the views *are* able to find templates
2017 Nov 29
1
[PATCH] builder: use the template arch when caching all templates
When caching all the templates, use the architecture of each template,
instead of the architecture passed as --arch (or the host architecture,
as default). This way, the right destination filename will be used.
Fixes commit b1cf6246f3c80762cf27dbdb24168589a34daf00.
Thanks to: Erik Skultety.
---
builder/Makefile.am | 2 +
builder/builder.ml | 4 +-
2010 May 17
0
ActiveResource 3 on MRI 191: NameError (uninitialized constant Builder::XmlBase::Symbol)
We''ve run into this before and, in this particular project, I''m
positive we had a hack somewhere to get AR to work but it seems to
have gone missing and I''m not finding any hints in git history or
Google. Any call to an AR.create will trigger it. Seems like a
strategically placed require or include did the trick but I''m probably
misremembering.
The offending
2017 Oct 27
0
[PATCH v11 5/8] builder: add a template parameter to get_index
get_index now gets a new template parameter. Setting it to true will
make the index parsing less picky about missing important data. This
can be used to parse a partial index file.
---
builder/index_parser.ml | 46 ++++++++++++++++++++++++++++++++++++++--------
builder/index_parser.mli | 5 ++++-
2 files changed, 42 insertions(+), 9 deletions(-)
diff --git a/builder/index_parser.ml
2017 Nov 13
0
[PATCH v12 2/3] builder: add a template parameter to get_index
get_index now gets a new template parameter. Setting it to true will
make the index parsing less picky about missing important data. This
can be used to parse a partial index file.
---
builder/index_parser.ml | 44 ++++++++++++++++++++++++++++++++++++--------
builder/index_parser.mli | 5 ++++-
2 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/builder/index_parser.ml