similar to: mysql dates

Displaying 20 results from an estimated 6000 matches similar to: "mysql dates"

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 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 19
3
template/variable confusion
Hi there, I''m having some trouble working out where/when I can define template variables. I have a standard.rhtml layout template which is used across the application as the main xhtml wrapper. Inside there is some code like this: <div id="<%= @layout_style %>"> <%= @content_for_layout %> </div> Now content_for_layout always works fine, but
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
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 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 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
2006 Jun 02
6
overriding constants
Hi there, I''m trying to override the defaults for form_helper. I can see in action_view/helpers/form_helper.rb: class InstanceTag #:nodoc: include Helpers::TagHelper attr_reader :method_name, :object_name DEFAULT_FIELD_OPTIONS = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS) DEFAULT_RADIO_OPTIONS = { }.freeze
2006 May 24
2
named routes confusion
Hi, I''m trying generate a URL from a named route like: namedroute_url(params...) but the generated route is always coming out as the first match from the routes table. The named route is defined inside a map.with_options block, but that shouldn''t matter should it? dorian -- -- I do things for love or money
2006 Mar 24
10
innodb vs myisam
Hi, I have been using myisam tables in mysql with rails because my client will soon want fulltext searchable content, however when I migrated my development db from schema.rb all of the tables generated were innodb. I understand that I can override this, but also like the transactions and foreign keys of innodb. So 2 questions really: 1. are transactions in activerecord dependent on innodb or do
2006 Mar 15
13
usage of constants
I would like to define some constants that I can use across models and views and I cannot figure out how to do that. Googling hasn''t turned up anything useful and I''m looking at the PickAxe book, and I get the impression that a constant must belong to a class. If I just want a constant like... CompanyPhoneNo = "(602) 999-9999" and be able to use it in any view
2006 Mar 15
1
file_column imagemagick strangeness
Hi, I''m using the basic magick features of file_column, and while files are uploading fine without the magick options, as soon as I do something like :magick => { :size => "400x600" } I get an ''invalid file'' error. Further investigation reveals that the file is in fact invalid because something somewhere is truncating the file path:
2006 May 18
1
ActiveRecord problems from within template
Hi, my Film model has this: has_many :live_action_personnel, :class_name => "Credit", :include => :credit_type, :order => ''credit_types.position, credits.position ASC'', :group => ''credit_types.personnel_type'',
2006 Apr 25
4
redcloth poblems
Hi, I''m having some problems with redcloth(3.0.4 gem) and textilize. I have a string: "h2. hello _what''s up?_" which is being textilized as: <h2>hello<br /> <em>what&#8217;s up?</em></h2> so no paragraph and h2 wrapped all the way. the input is coming from firefox 1.5.2 on a mac Anybody got any idea what the problem might be? --
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what you get using date_select with the :include_blank => true option where the first value in the dropdown is "- Month -", "- Day -", or "- Year -" rather than a blank value for the respective month, day, and year select fields. I took a look at the ruby source for
2006 May 18
2
How to add hint to link_to_remote?
To add a hint to normal link is very easy: link_to ''design'', {:action => ''design'', :id => survey}, :title => ''Design the survey'' but, after trying several times, I still can''t figure out how to do the same to link_to_remote. I''ve tried put :html => {:title => ''blah''}. It doesn''t
2006 May 09
1
name_url in tests
Hi there, I posted earlier asking about testing named routes in functional tests, but got no response, so I''m making my question less specific. It seems from the docs that it''s possible to to test named routes in cases such as: asserts_redirect_to name_url(:param => "whatever") but I haven''t seen any mention of it being used with any other tests and I keep
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 May 16
3
wondering how to do some clever DRYing up
Hi there, I''m now getting to the point in my rails app where I can use all of the nice basic features like AJAX and engines etc... but, I want to get my hands a bit dirtier, whilst learning to DRY up my code a bit. I''m using AJAX quite a bit to dynamically populate/edit/sort has_many relationships in forms, and consequently on a model with many has_many''s I end up