similar to: template/variable confusion

Displaying 20 results from an estimated 800 matches similar to: "template/variable confusion"

2006 Jan 23
11
mysql dates
does anyone know of a way to make the date_helper deal with mysql dates with 00 values in them? I have lots of dates that are like the following: 2005-04-00 2005-00-00 and I need to set null values in a date_select for elements that are 00. These are valid dates in mysql. In the absence of an immediate solution to the above, I''ve been trying to find out how InstanceTag.new works so I can
2006 Jan 25
1
deep inspecting attributes
Hi there, in one of my templates I have the following code: <% for film in @artist.films %> <h3>films</h3> <p><%= link_to film.title, :controller => ''films'', :action => ''showfilm'', :animate_title => film.animate_title, :page => ''synopsis'' %></p> <% end %> however if I do: <%=
2006 Jan 23
2
require rmagick
Hello, I''m trying to use rmagick in a helper script (for auto-generating image sizes) and I''m not sure where I should be calling ''require''. currently I have: require ''RMagick'' at the top of my controller: class FilmsController < ApplicationController require ''RMagick'' but that''s giving me an error:
2006 Jan 19
4
PHP ob_start in Ruby
I need to include Content-Length in each file. In PHP it would be: <?php ob_start(); ?> html <?php header(''Content-Length: '' . ob_get_length()); ob_end_flush(); ?> How can I do the same in Ruby? Thanks, eduard -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jan 18
1
using unique varchar instead of id
Hi, I just signed up so ''hello everybody''. As the title suggests, I was wondering if there was an easy way to specify that I want all actions/controls to be based upon a particular parameter rather than :id (in this case :unique_name). I don''t :id to appear in URLs or elsewhere, I want it all to work from :unique_name. It seems like something that I should be able to
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout test_controller def list layout "stdlayout" end in the views/test/layouts stdlayout.rhtml <html> <head><title>test</title></head> </body> <h1>Test</h1> <%= content_for_layout %> </body> </html> 2) I get Rails Application Error when trying to use a separate
2006 Jan 25
0
InstanceTag
Hi, I''ve been prying my way around form helpers and I need to do something very similar to date_select. I was thinking I might be able tailor it to suit my purposes and then came upon InstanceTag.new with a call to_date_select_tag at the end. I can''t find any mention of these anywhere else - can anyone give me any pointers as to what these two things do? thanks dorian -- I do
2006 Jan 26
0
setting default on "has_one" failure
Hi there, I have a model for a Film, which: has_and_belongs_to_many :artists has_many :stills has_one :preview_image, :class_name => "Still", :conditions => "priority=''main''" the has_one:preview_image and has_many:stills obviously draw from the same table. I was
2001 Jan 22
0
vorbiscomment gui ideas
I was playing in Glade tonight with couple of GUI ideas for the vorbis comment editor. I've attached the glade file. A few notes: On the user-friendly version, we might want an "Advanced" tab that would pop up the user-hostile version to edit "non-standard" comment tags. I'm just not sure how to do that in a way that won't scare the non-technical. We need to
2006 Jan 19
0
setting helper defaults
Hi, I''ve trawled the docs and the wiki, and I''m wondering if it''s possible to set an option globally on a helper (within a given controller) (DateHelper in theis instance). I know beforehand that I''ll always want :include_blank => true, :start_year => 1991 and I have a lot of date fields. This possible? thanks in adv. d -- I do things for love or
2007 Feb 15
17
Odd parameter munging with with()
Hi, I have this setup block: setup do session[:login] = ''jhughes'' @user = mock("user") User.stub!(:find).and_return(@user) @params = {:cn => "Bilbo Baggins", :telephoneNumber => "416-277-4418", :mail => "bilbo at baggins.com"} end And then this spec: specify "should update and save the
2006 Apr 25
3
limiting options in file_upload
Does anyone know if it''s possible to set constraints to the size & type of file that file_column will accept? I''d like to limit to image files of less than 2MB. If this isn''t possible with file_column, is there a graceful way of getting the controller to handle it? thanks dorian -- -- I do things for love or money
2006 Jun 15
5
Cannot invoke ActiveRecord subclass accessors in DRb worker
Hi there, I''m trying to create a worker to do some asynchronous web client work and update the data model with its results. It seems, however, that every call I make to an ActiveRecord subclass causes the whole thing to block. At least I think it''s blocked. Right now I''m just using debug log output. Is there a decent way to debug/test workers I can try? Is there any
2006 May 13
1
newbie question - routes.rb on server
Hello, I am new to Ruby but not to programming. I have a domain name and server space with a host who said that ruby on rails should work on the server. All I want to do is make sure that a test ruby application works online so that I can begin development on an app. I am able to get the test program to work locally but not online. In C:/ruby/projects/test/controllers/TestController.rb:
2008 Oct 22
2
smbd high cpu load
We have a Linux file server for a set of computer science and engineering labs where each lab contains machines running Mac OS X, Ubuntu Linux, or some incarnation of Windows. At times the these machines become almost unusable and I think I have narrowed the problem to smbd processes soaking up all the CPU on the server. Running 'top' on the server reveals a dozen or so entries like
2006 Jul 22
3
Connection refused - connect(2)
Dear all, Please help me in this regards, I am using models to access LegacySchemas using set_table_name and set_primary_key... [code for model] class CdDetails < ActiveRecord::Base def self.find_data set_table_name ''cd_details'' set_primary_key ''cd_label'' find (:first, :select => "cd_label") end
2006 Jun 01
9
access model from controller
Hello, Rather new to RoR, so I''m not sure about the terminology and such :-/ . My question is: how could I know the model which is associated to a controller? For example: - controller class is TestController, which is a subclass of ApplicationController - associated model class is Test How could I write some code in a method of ApplicationController to dermine the current
2006 Apr 28
2
tests and login_engine
Hi there, I just started writing tests today after some months of using rails (slap wrists). I seem to be getting the hang of things, but I''m hitting a wall when it comes to functional_testing pages protected by login_engine/user_engine. all my assertions come back with: Expected response to be a <:success>, but was <302> Is there a way I can login from within a test?
2006 May 11
4
/public content security
Hello all, I have a question regarding the security of my new web zine. The idea is that I have editors that can log into the site, and then upload comics in the form of a jpg. The way that I have this set up right now is that the jpg is submitted through a form and then placed into the authors sub directory in public/comics/. The record of the jpg is stored in a pendingcomics table
2006 Mar 20
3
login_engine
Hello, I''m having trouble getting login_engine to work properly. I get the standard login/registration views, but whenever I try to register I get: NoMethodError in User#signup undefined method `password_confirmation='' for #<User:0x408b2f9c> I have login_engine, and engines installed from cvs: http://opensvn.csie.org/rails_engines/plugins/ anyone else had anything