similar to: render :partial stops setting local variables.

Displaying 20 results from an estimated 400 matches similar to: "render :partial stops setting local variables."

2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0 for me. On multiple platforms I continually get the same errors. It took me awhile to figure out some initial things, such as Migrations don''t seem to support Enum column types, and doesn''t really support Foreign key relationships (the constraints at least). After changing my DB schema to jive more with the
2005 Dec 19
2
Logging of Form information in production environment.
It seems that in the default Production environment, Rails logs posted form data. Isn't this a security risk? Especially since a user creation form puts this in the logfile: Processing Base#index (for 127.0.0.1 at 2005-12-18 21:03:33) [POST] Parameters: {"user"=>{"password_confirmation"=>"mypassword", "username"=>"seanwolfe",
2006 Jan 21
4
Single quotes in parameters
I have a "search" action for my "projects" controller, which defines a set of projects as follows @projects = Project.find(:all, :include => [:user,:clients], :conditions => "name like ''%" + params[:query] + "%''",:order => ''number'') This works fine, until I type an entry into my search box that has a single
2006 Feb 02
3
breakpointer failing
Hey there, I got a new workstation going on here an Intel iMac, and I''ve compiled and installed everything with intel binaries. Everything works fine, I even got that cool clever lighttpd script running (http://www.bigbold.com/snippets/posts/show/303). But the one thing that doesn''t work is breakpoints and the breakpointer script. When I run script/breakpointer, I get the
2006 Feb 11
3
Intial data in Migrations
One thing I found annoying about Migrations, besides that you have a very limited ways to define your data, is that it will overwrite EVERYTHING in your schema file. So if you spend hours customizing your initial schema file, to get it work, exactly like you''ll need it, that work immediately becomes for nothing once you run a migration. Your entire schema will get rewritten, not appended
2006 Feb 03
3
Breakpointer not working
When I try to run script/breakpointer, I get the following error: /usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getnameinfo: Non-recoverable failure in name resolution (SocketError) It''s Rails 1.0 on OSX 10.4.4. Any suggestions?
2006 Jun 08
5
AM/PM select
I have a customer that has a request that the select_datetime fields have AM/PM selectors instead of 24 hour time. The rails time and datetime selects seem to only support 24 hour time. I can''t seem to find any information on this. i was wondering if there is already a solution out there, or will i have to roll my own? Sean Wolfe master nerd of i heart squares, inc. 3711 N.
2006 Feb 20
1
Breakpointer fixed in OSX 10.4.5
The new build of OSX 10.4.5 seems to fix the issues many have been reporting with the breakpointer script. This fix at least seems to work on the Intel macs. Haven''t checked it on the PPC macs yet, but I haven''t had the ''getaddrinfo'' errors on the PPC macs. -- Sean Wolfe master nerd of i heart squares, Co. 3711 N. Ravenswood Ave. #147 Chicago, IL 60613
2008 Mar 23
6
Locals do not appear in partial unless collection is explici
Maybe I''m misunderstanding something but it appears as if <%= render :partial => @items, @locals => { :this => ''that'' } %> does not give the local variable this but this one does: <%= render :partial => ''items/item'', :collection => @items, @locals => { :this => ''that'' } %> Shouldn''t they mean
2005 Dec 22
11
first day using rails
Hi - this is my first day with Ruby on Rails. I''m starting out by working through the Helloworld (Hello Ruby) example program printed up in "Agile Web Development with Rails." My steps are as in the text: 1. ruby script/generate controller Say 2. edit the proper file and add the hello method 3. fire up the browser using address http://localhost:3000 4. fire up the
2006 Mar 27
0
Contract Development positions available.
Hi list, sorry to post this here, but I figured I''d throw out a hook and see if I get any nibbles. My usual network channels are turning up dry, and I''d rather offer this directly to the Rails community before I start hitting up Monster/Dice and headhunters. Our work base has been growing and I really need to hire someone on a contract basis to fulfill some
2009 Oct 28
2
render :file cached?
In my application I have a controller/view that displays the contents of an audit log file def audit_log render :layout => ''table'', :file => AUDIT_LOG end The audit log is updated frequently but the render call does not re- read the file so it gets stale. Is there a way to tell render to check the file timestamp and reload as needed?
2002 Aug 14
1
Browse Master
Greetings, I'm having a problem where our samba host is loosing browse master elections to a Windows 2K notebook that is transient to our network. In the smb.conf I have set the following paramaters in the [global] section: local master = yes preferred master = yes os level = 255 After I made the above changes I restarted the host and at that time it won the election and we could browse
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 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 Jan 19
0
best way to set default for an optional local in a partial?
What''s the best way to set the default value of an optional local variable in a partial template? In the past I''ve used <% foo = default_value unless (defined? foo) %> But http://api.rubyonrails.org/classes/ActionView/Base.html says *not* to use (defined? foo) and instead use (local_assigns.has_key? :foo) thus <% foo = default_value unless (local_assigns.has_key?
2007 Aug 14
12
expect_render, why does there need to be a warning
There is a warning on the web site about expect_render and stub_render: "WARNING: expect_render and stub_render, while very useful, act differently from standard Message Expectations (a.k.a. mock expectations), which would never pass calls through to the real object. This can be very confusing when there are failures if you''re not aware of this fact, because some calls will be
2008 May 08
0
stub sub partials when testing partial with rspec
Hello all I prefer to use many partials. It makes my code more DRY Also I use rspec, and when I have to test partial with sub partials I have a problem. if I stub render, then my partial will not be rendered. If i do not stub render it tries to render sub partial (and i don''t need this) Not very long googling did not bring the answer, so I made very dirty and IMHO dangerous function
2005 Dec 19
1
Preserving fallback with RJS
Hi guys, I really like RJS. I think they''ll replace partials in alot of instances. Unfortunately, because they''re automatically used like .rhtml and .rxml and are hard to specifically specify it makes it messy to preserve fallbacks when using them. For instance, using partials instead of rjs, my create method might look like: def create post = Post.new(params[:post]) ...
2005 Feb 16
1
Can't connect Snom 190 to Asterix PBX. Sugge stions?
Here is a part of a working sip.conf for Asterisk with SNOM190 Phones. Try using host=dynamic and have a closer look at the configuration in the snom 190. Also, try using dtmfmode=rfc2833 . [general] realm = hallinux2.gwsnettech.local port = 5060 bindaddr = 0.0.0.0 context = default disallow=all allow=alaw allow=ulaw allow=gsm register => 081503:xxxxxx@sipgate.de/081503 language=de tos=0x04