search for: cbowmanschool

Displaying 20 results from an estimated 37 matches for "cbowmanschool".

2006 Jan 17
6
database.yml and remote mysql database
I can''t seem to connect to a remote database. Here is what I''ve tried. the database,username,password, and host have been changed to protect the innocent. development: adapter: mysql database: database username: username password: password host: host port: 3306 Here is the error /usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 11, col 2: `
2006 Jan 26
4
is Client.find(params[:id]) safe?
@client = Client.find(params[:id]) I use the above line in alot of scripts because it is shown this way in the Rails book. Is this safe. Does it use placeholders? Will it leave me open to an SQL injection attack? -- Posted via http://www.ruby-forum.com/.
2006 Apr 08
4
rails won''t cache my action
I''ve decided to dive into page caching for my rails app. I''m doing my testing with webbrick and it refuses to display the cached page for a particular action. I''ve modified my paginator helper to put the page parameter in the url so that the paginated page can be used with caching. This works perfectly when the page parameter is in the url (ie browse/2006/2 or
2006 Apr 08
2
Is caching in rails broken or at least very flawed?
I was going to add caching to my applications, but everything that I''ve found through google is about all of the problems everyone has had with caching. Is is really as bad as I''ve read? -- Posted via http://www.ruby-forum.com/.
2006 Jan 05
0
Re: help with link_to_if, I can''t make it work..
Nooby guess, Do you need a comma between comment.web_site and {"class... ? Looks like there should be 4 params...test, text, href and html_params A. On 4 Jan 2006, at 04:42, rails-request@lists.rubyonrails.org wrote: > Date: Wed, 4 Jan 2006 05:05:39 +0100 > From: charlie bowman <cbowmanschool@yahoo.com> > Subject: [Rails] Re: help with link_to_if, I can''t make it work... > To: rails@lists.rubyonrails.org > Message-ID: <3b2a53e1cd0cc426350c06ff42fa5c3c@ruby-forum.com> > Content-Type: text/plain; charset=utf-8 > > has anyone else tried to use link_to_if...
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on this. I''ve nearly got my plugin finished but I can''t seem to get this to work. The method is in ActionController::Base but it is protected. -- Posted via http://www.ruby-forum.com/.
2006 Feb 07
17
Easy way of dealing with nil properties in templates?
Is there an easy way to deal with nil properties in templates? All I''m aware of are these methods, and it''s quite tedious and surely violates DRY. <%= @member.name unless @member.name.nil? %> <%= @member.name.to_is %> <%= "#{@member.name}" %> csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the
2006 May 26
11
Weird Caching Issue
Hey all, Here''s the issue... I''m not entirely sure it''s even a Cache-related issue, but here it goes: I''ve deployed a Rails app onto a subdomain of my clients site... The server is running Apache2, and I''m proxying through to Lighttpd. The issue I''m having is that I''m able to add content to the site (data exists in the db), but
2006 May 26
1
access a ActionControllers protected method from plugin?
I can''t belive I fit that in as the subject! I''m writing a plugin that will allow me to grab some text from a database and call the render method from ActionController on part of the text. I can''t seem to figure out how to access the render method of ActionController::Base. I keep getting the "uninitialized constant Execute" error. How can I do this?
2006 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe one of you guys can help me out. I''ll show my sweeper and then my log to show that it "should" be working. class PragmaticSweeper < ActionController::Caching::Sweeper observe Comment def after_save(comment) expire_page(comment.post_id) end private def expire_page(post_id)
2006 Apr 30
1
storing sessions in RAILS_ROOT/tmp
I''ve read that the newest versions of rails stores sessions in rails_root/tmp. I''ve been running off the trunk for about 3 months, but I still have all of my sessions stored in /tmp of the file system. What do I need to do to modify it so that my sessions are stored in my rails_root/tmp folder? -- Posted via http://www.ruby-forum.com/.
2006 Mar 08
2
fade out and then fade in....how to make it work?
I''m trying to have one image fade out and then another slidedown upon completion of the ajax call. I can''t get the timing correct. How do you do it? Here''s what I''m trying (this does not work) <%= link_to_remote(image_tag(url_for_file_column(product, "image_url"), :update => ''right_content'', :url => {
2006 Mar 17
1
does the template know the name of the method that called it
Within a template, is it possible to get the name of the calling method? What other data can you query within your template? -- Posted via http://www.ruby-forum.com/.
2006 Feb 27
0
application helper and tri-state images
I''ve come up with a very hackish way of creating a tri-state image navbar. I don''t like it but it works pretty well. I would love to know the ''rails'' way of doing this or even just a suggestion. Here''s my helper. module ApplicationHelper # we use this function to create the tri-state image with rollovers # todo I need to use a good css trick
2006 Feb 28
0
help with sanitizing html (comments in blog)
I''ve added this method in my model which is called with each save. It does a good job getting rid of html tags and then emplementing RedCloth. I''m very new at blogs so I''m not sure if this is adequate or not for comments. What do you think? I would love to hear if this is safe, unsafe, or just plain bad form. Also, I don''t think that RedCloth is
2006 Jan 08
0
link_to_remote(image_url url_for_file_column(product, "image
I apologise for bad formatting. I don''t know how to make it nice in an email How do you nest image_url tags into link_to_remote tags. The following creates the error:wrong number of arguments (3 for 2) <%= link_to_remote(image_tag url_for_file_column(product, "image_url"), { "class" => "small_product",
2006 Jan 27
1
mysql cluster problem
I have a small rails app that works on fine connecting to two different testing databases, but when I try to connect to our mysql cluster database I receive this error. I am running rails 1.0 Mysql::Error: Lost connection to MySQL server during query: SELECT COUNT(*) FROM product The two testing databases are running mysql 4.0 and our cluster database is running mysql 4.1 Anyone got any
2005 Dec 19
1
<% unless params[:context] == :gallery -%> question
I have a template that is called by two different methods. I only want part of it too show up when it is called from one of the methods. It always shows up for me. Can someone help to point out my error? Below is the method that should keep part of the tempate from printing, and the relevent part of the template. method: def gallery @product_pages,@products = paginate(:products,
2006 Feb 26
3
how to format and syntax highlight code in html
I''ve written my own blog (I know typo is better, but I wanted the experience of writing my own) and I want to add syntax highlighting to it. I''ve read about using the ruby gem syntax but I can''t figure out how to implement it. I''ve also wondered if it could be used in my case. How does it work when you have a long line of code but the <div> your
2006 Jan 18
3
legacy database on remote host
I''m getting this error in webrick then it crashes leaving nothing in the log. ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so: undefined symbol: mysql_sqlstate Here is the standard query I would normally write to get the data. select * from child,parent where CONCAT(SUBSTRING(child.item_number,1,14,''00'') = parent.order_number and