Displaying 20 results from an estimated 90000 matches similar to: "render_file works, render :file doesn''t"
2007 Jul 12
1
form_tag doesn't accept a string anymore in edge rails?
So, here''s the offending line. Note that I''m using edge rails.
form_tag verifications_path(@user), :method => :post do
verifications_path(@user) returns a string like "/users/3/
verifications". That eventually gets sent to url_for, which expects a
hash. And then it blows up.
It''s especially disconcerting since the documentation shows form_tag
as
2008 Dec 08
2
undefined method 'render_file' for class 'ActionView::Base'
I need some help with SimpleLog
I have SimpleLog running at HostingRails.
I want to develope and test new themes stuff on my local system.
I getting the error from actionview_ex.rb:12
undefined method ''render_file'' for class ''ActionView::Base''
I am at:
Ruby: 1.8.6
Rails 2.2.2
gem: 1.3.1
rake: 0.8.3
I am a new rails/merb/ruby developer. I think I am on the
2008 Dec 17
9
Rails 2.2.2 and globalize - undefined method `render_file' for class `ActionView::Base' (NameError)
Looks like globalize (1.2) is not compatible with rails 2.2.2. I am
getting:
''
=> Booting Mongrel (use ''script/server webrick'' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3003
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3003
** Starting Rails with development environment...
2007 Jul 06
3
stubbing helper methods for View specs
Hi there
I have several view specs, that include the following snippet in
their "before" block to stub the methods by acts_as_authenticated
before :each do
@u = mock_model(User)
@u.should_receive(:name).and_return("Hans Muster")
template.should_receive(:logged_in?).and_return(true)
template.should_receive(:current_user).and_return(@u)
end
this
2006 Mar 13
1
has_many.collection<<obj doesn''t set attributes?
I tried:
@item.stuff<<thing
and in thing I have:
def stuff_id=(value)
# remember old stuff_id cuz Rails has lousy trigger equivalent
logger.debug ''set stuff_id called''
end
And apparently stuff_id doesn''t get called, but the fk is changed
directly in the database? I''m about to abandon trying to do trigger
related stuff in Rails and go back to
2006 Jul 24
0
Why doesn''t default_url_options :anchor => ... work for render
In my action, I test to see if a particular button was clicked, if it
was, I want the template to render, but to go to a particular anchor,
like #company.
E.g.
if params[''add_company'']
default_url_options :anchor => ''insurance''
end
#... logic
# then default render
In the add.rhtml:
<a name="company">
<%= text_field model, company_name
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 =>
2006 Oct 17
4
Mocking the rendering of a Rails template
Hello all,
I''m having difficulty setting up mocks such that I can verify that
Rails was going to render the right template file (for example
new.rhtml) and stop Rails from performing the actual rendering.
After peeking at Rails'' internals, I tried two techniques as illustrated here:
http://pastie.caboo.se/18197
Neither worked.
I think the first one failed because Rails
2007 May 28
1
Rails matcher render_template is wrong when using GetText, looking for flexible solution
I have a problem with a mismatch between RSpec Rails and the actual
behavior when using GetText, and would be glad for suggestions how to
best solve this.
When using GetText a failure is reported for the following simplified
specification:
describe SamplesController, "when requesting /samples" do
it "should render index " do
get ''index''
2006 Mar 06
13
Internal Server Error - I want to cry
I got a brand new Fedora Core 4 box and was all excited to get Rails
running on it. That was about two days ago. I did all the ''yum install
ruby, etc. etc. etc.'', then ''gem install rails, etc. etc. etc''. I''ve
tried running Rails with httpd (fastcgi and cgi), lighttpd (scgi,
fastcgi, cgi), mongrel, webrick, and even ''ruby
2006 Feb 07
2
render collection undefined local variable
Why am I getting undefined local variable ''contact'' in my partial.
This is code I used to render the partial, works in lots of other places
<%= render (:partial => ''list'', :collection => @contacts) %>
in my parital I have
<%= contact.first_name %>
if I write this way it works fine
<% for contact in @contacts %>
<%= render (:partial
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
2006 Apr 17
5
Strange question on file_column
I have met a very strange problem on file_column usage.
After I have added
file_column :image
to the model,everything is ok.
But after I added more:
file_column :image, :magick => {:versions => {
:thumb => {:size => "50*50"},
:medium => {:size => "640*480>"}}}
I can not even start the whole website! Here is the
2005 Oct 13
1
Typo Error: wrong number of arguments (1 for 2)
Howdy,
I am trying to run the latest version of Typo and when I hit the admin
login, I get the error below.
Anyone else seen this?
H
ArgumentError (wrong number of arguments (1 for 2)):
/lib/renderfix.rb:20:in `read_template_file''
/lib/renderfix.rb:20:in `render_file''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1.2471/lib/action_controlle
r/base.rb:637:in
2007 May 30
2
ActionView::TemplateError
Hi,
I have a strange problem that only occurs on the production server.
I''ve been banging my head for hours trying to figure it out with no
success. Below is a copy of the error from the production log.
ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/
public/../config/../app/models/image.rb to define Image) on line #6 of
app/views/admin/design/_record.rhtml:
3:
2006 Feb 27
0
when partial render is wider than the main part, scroll doesn''t appear on the browser!!!
Hi,
in my rhtml, I have two parts, the main part and a
partial, the main part has a width almost the same,
but
the partial is much longer and width. when it happens.
the vertical scroll appear correctly on the browser,
but the horizontal scroll doesn''t appear on the
browser, it appears instead on the partial render
part, so I have to scoll down until the end of the
partial, that use the
2006 Jun 23
1
rubyful_soup works fine as an RB file but bugs in Rails
This is the code:
1 require ''rubyful_soup''
2 require ''open-uri''
3
4 url = "http://www.google.com/search?q=ruby"
5 open(url) {
6 |page| page_content = page.read()
7 soup = BeautifulSoup.new(page_content)
8 result = soup.find_all(''a'', :attrs => {''class'' => ''l''})
9 result.each {
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
Hi all,
Please excuse the long post, but I wanted to make sure you have all the
information....
I have a NewsModel that looks like this:
class News < ActiveRecord::Base
belongs_to :user
validates_associated :user
validates_length_of :title, :description, :minimum => 5, :allow_nil
=> false
acts_as_commentable
acts_as_taggable
def self.find_recent
News.find(:all,
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi ,
i''m having a problem with rendering a partial , the partial is in the
apps/view/polls folder with the name : _antwoorden_user.rhtml
in the view i''m rendering it with
<% if @user %>
<%= render :partial => ''polls/antwoorden_user'', :locals => {:poll =>
@poll, :user => @user} %>
<% else %>
....
gives me the error =>
No
2006 May 22
4
RMagick gem problem using Rails and possibly WEBRick...
Hello, I am new to rails but have been having fun so far. Until now.
I
am sure this is just my inexperience but I have the RMagick gem (ruby
gem
for using imagemagick manipulation) installed on my machine that I
would
like to then use in my rails app. I first installed it and tried it
out,
and it didnt do anything for me, took me a while to realize I needed
the
windows RUBYOPT