similar to: InstanceTag

Displaying 20 results from an estimated 900 matches similar to: "InstanceTag"

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 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 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 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
In Ruby you can add and modify existing classes at will simply by reopening it. The 4 files you mention add functionalities to the InstanceTag class. This is not a redefinition. The best part is that you can do the same ! An easy way to overwrite an existing method or to add new ones is to create a file under you rails application lib directory and put in it the replacement you want to make:
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 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
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
2006 Sep 04
1
Overriding ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS
What is the best way to override some of the FormHelper default options? Right now I''m adding this to the beginning of my environment.rb: ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 80, "rows" => 5 } Is that the way it''s supposed to be done? --~--~---------~--~----~------------~-------~--~----~ You received this message
2007 Mar 09
0
InstanceTag#value changed in 1.2
In Rails 1.2, the interface to InstanceTag#value and #value_before_type_cast changed, and looking through the svn and Trac history, I can''t see why. It appears that every call to #value now passes the same argument (the result of the #object method), which just duplicates what the function did before it took an argument. The reason I bring this up is that the change breaks some of our
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 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 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 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
2013 Feb 28
1
Make `ActionView::Helpers::InstanceTag#tag_id`, `ActionView::Helpers::InstanceTag#tag_id_with_index(index)` public?
As I asked in StackOverflow<http://stackoverflow.com/questions/15127658/hoe-to-get-tag-id-from-a-record-in-form-for/15129741> I think it would be helpful since we can dynamically create javascript code to control each input tag in form helper, what do you think? Or there has already been a solution? -- You received this message because you are subscribed to the Google Groups "Ruby
2006 Jun 07
1
railstidy
Hi there, anyone had any trouble with railstidy? I''m using it on 1.1.2 just to tidy my output and I get a server error everytime, but the only log message I get is: FastCGI: incomplete headers (0 bytes) received from server "/var/rails/dev/public/dispatch.fcgi" I have: after_filter :tidy def tidy RailsTidy.filter(response) end ...in my application.rb and I can get
2006 Mar 29
1
load testing
hi, does anyone have any pointers for load testing an app running on apache2 with fastcgi? I have an app running circa 3000 page requests per day, most of which are static pre-cached files and fastcgi seems to be coping well so far (crosses fingers) but I would like to be able to work out my server limit. Currently I have the following in my apache conf: FastCgiServer
2007 Jan 24
0
ActionView::Helpers::InstanceTag#to_date_tag help
I''m trying to read through the code, hoping to find a way to custom style select boxes for a date_select and can''t figure out this code. Any help appreciated: <code> def to_date_tag() defaults = DEFAULT_DATE_OPTIONS.dup date = value(object) || Date.today options = Proc.new { |position| defaults.merge(:prefix =>
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 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