Displaying 20 results from an estimated 10000 matches similar to: "How to bulid additional link to"
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
Problem:
1. ERB and Builder template engines are heavily wired in ActionView::Base
2. Should be optional. If we use different engine - why load all their
stuff if not needed?
3. There are template engines which expect files in their own locations
and cache them in their own way. For instance a template engine may
store templates in a database. These engines don''t need any central
source
2010 Jul 22
0
TemplateError while rendering german special characters
Hi
I am using following versions of Ruby and Rails on arch linux
[hardik@sunshine: kandibank ]$ ruby --version
ruby 1.9.1p429 (2010-07-02 revision 28523) [x86_64-linux]
[hardik@sunshine: kandibank ]$ rails --version
Rails 2.3.8
I am using the sqllite database in development mode.
I can store a string having German special characters (umlauts) without
a problem i.e. Müller.
But when Rails
2012 Jun 25
1
ActionView::Template::Error (undefined method `strftime' for nil:NilClass):
Hello, I''m a newbie. I need help resolving this issue. I recently added a
pdf to the newsletter admin section of the website and now I can no longer
view page 2 of the list of pdf''s. Nor can I login to see the newsletters as
a student. I''m using Ruby 1.9.3, Rails 3.2.1.
Here''s the information from the log file.
ActionView::Template::Error (undefined
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
2011 Dec 02
0
Testing Views with Rails 3 and Rspec2 - Can't stub request.path_params[:controller]
I am stuck to test a specific view which contains a
request.path_parameters[:controller] variable as the example below
follows:
<%=link_to "Store", admin_stores_url, { :id => "tab-3" ,:class =>
(admin_stores_path == ''/'' + request.path_parameters[:controller] &&
''active'')} %>
The rspec view test file:
describe
2012 Jun 26
4
ActionView::Template::Error (undefined method `strftime' for nil:NilClass)
Hello, I''m a newbie. I need help resolving this issue. I recently added a
pdf to the newsletter admin section of the website and now I can no longer
view page 2 of the list of pdf''s. Nor can I login to see the newsletters as
a student. I''m using Ruby 1.9.3, Rails 3.2.1.
Here''s the information from the log file.
ActionView::Template::Error (undefined
2008 Dec 18
2
Render a view from console
Hello!
In my application I''m trying to render a view from a class in /lib
folder. I have found that it''s very similar to render a view from
console. So, I have tried different methods:
>> string = ActionView::Base.new.render( :inline => ''works'', :layout => false )
=> "works"
>> string = ActionView::Base.new.render( :template =>
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so:
# ApplicationController.rb
protected
def render_optional_error_file(status_code)
render :template => "errors/500", :status => 500, :layout => ''application''
end
However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1.
Having this page:
<h4>Editing project</h4>
<% form_for(:project, :url => project_path(@project), :html =>
{ :method => :put }) do |f| %>
<p>
Name <%= f.text_field :name %>
Date <%= calendar_date_select :project, :target_date, :time =>
2011 Mar 02
0
polymorphic_path not getting generated
Folks,
I am trying to use the Savage Beast plugin in a polymorphic way. I
have setup my model as below
# Leaving out other details from models
class Forum < ActiveRecord::Base
has_one :recent_topic, :class_name => ''Topic'', :order => ''sticky
desc, replied_at desc''
belongs_to :forum_owner, :polymorphic => true # Helps keep track
of which
2012 Oct 02
3
[Btrfs-next] bulid failure at fs/btrfs/ctree.h
Hello Josef,
FYI build failure occured in fs/btrfs/ctree.h.
CC fs/btrfs/super.o
In file included from fs/btrfs/delayed-inode.h:30:0,
from fs/btrfs/super.c:45:
fs/btrfs/ctree.h:3235:1: error: expected identifier or ‘(’ before ‘<<’ token
make[3]: *** [fs/btrfs/super.o] Error 1
make[2]: *** [fs/btrfs] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `
make:
2006 Feb 07
0
scope problems testing a helper method that calls link_to()
We''ve been having problems writing functional tests for helper methods
that rely on ActionView methods. Here''s a specific example.
In application_helper.rb I''ve got a method called ''party_link()¨:
def party_link(party)
link_to party.full_name, { :controller => ''contacts'',
:action =>
2001 Feb 13
4
cvs bulid breaks on slackware
cvs code from this morning (about 9am PST) breaks on slackware 7.1 w/ gcc
2.95.2.1 with an undefined reference to session_setup_sia in session.o.
this seems to be the culprit here:
#ifdef HAVE_OSF_SIA
#else /* HAVE_OSF_SIA */
session_setup_sia(pw->pw_name, ttyname);
since i have no idea what that's trying to accomplish (and seems to be a bit
backwards to me from looking
2006 Jul 17
0
Ruby-GetText-Package-1.7.0
Hi,
Ruby-GetText-Package-1.7.0 is now available.
Enjoy L10n!
Changes
-------
* Improve to support Ruby on Rails
* Localize ActionView::Helpers::DateHelper.distance_of_time_in_words.
* Localize ActionView::Helpers::ActiveRecordHelper.error_message_on.
* Add ActiveRecord::Base.untranslate, .untranslate_all to prevend to
translate columns.
* "ID" fields are ignored as
2006 May 21
6
Is there a way to call helper methods in a controller?
Hi,
Is there a way to call helper methods in a controller?
I want to do something like this in my controller
Class MyController < Action....
def my_method
string = link_to "some_url", :controller => "home", :action => "command"
end
end
link_to is an ActionView helper method and it seems that I couldn''t access
the method in the controller
2006 May 11
3
can''t call link_to from within a model class
can anyone tell me how to call link_to from within a model class? I''m
trying to do something like the following:
validates_uniqueness_of :email, :message => "address has already
been taken. If you''ve forgotten your password, please click " +
link_to(''here'', :action => ''forgot_password'', :controller =>
2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello -
I am fairly new to Ruby on Rails, but feel like I am learning quick.
I have what seems to be a fairly unique issue as I cannot find much
out there that describes what I''m seeing. Hopefully it''s a very
simple fix, and I simply can''t see the forest through all the trees!
I am attempting to create 2 related drop-down lists in the same
form_for, both using
2009 Oct 02
2
Plural version of the model detected, using singularized version. Override with --force-plural.
what is the proper way to make this work? --force-plural doesn''t seem
to change the results. this only seems to happen when you choose
words that the plural and singular is the same word.
script/generate scaffold equipment name:string description:text
warning Plural version of the model detected, using singularized
version. Override with --force-plural.
results in the following
2009 May 20
1
templating language questions
Hello,
I''m experimenting with a xhtml templating language and have some
questions about ActionPack, particularly to do with compilable
templates. I''m mostly looking for further information about compilable
templates.
The templating language currently works, though it isn''t a compilable
template handler. I''ve yet to benchmark it, but it seems to be running
2008 Oct 12
0
How to test with RSpec a Rails plugin using “link_to” and “current_page?”
I''m writing a Rails plugin that builds up a menu in a view. I''m using
*link`_`to* to build the link and *current_page?* to set
class="active" on the current page.
I''ve *include*d *ActionView::Helpers::UrlHelper* so I can use
*link`_`to*.
To get *current`_`page?* working in the view, I''ve had to inherit the
current class (apparently ActionView::Base)