similar to: Formating Float ActiveRecord attributes in text inputs

Displaying 20 results from an estimated 900 matches similar to: "Formating Float ActiveRecord attributes in text inputs"

2006 Mar 01
3
Form helpers and overloaded methods - help!
Can someone explain why form helpers appear to bypass any model methods I override for fields that are bound to database fields? It would be great if someone could tell me how to force the form field, etc to call the method instead of looking at the database / attributes collection. Let''s say I have a column called ''price'' in my database table "books"
2006 May 18
3
populating array of text_fields from an array of model objects
I have in my view the following: <% 0.upto(@num_performances) do |idx| -%> <%= text_field ''performance'', ''city'', :index => idx, %> <%= text_field ''performance'', ''venue'', :index => idx, %> <% end -%> and in my controller I have: @performance = [Performance.new("city" =>
2006 Jun 15
10
Finding out all terms from search results. How?
Hi everybody, I need to find out all terms (field values) from one of the fields from a set of documents returned by search. In other words, I have indexed documents with two fields. I do search on one field and then want to know all other field''s values from fount documents. How? -- Sergei Serdyuk Red Leaf Software LLC web: http://redleafsoft.com -- Posted via
2006 Jun 15
1
Ferret::Analysis::PerFieldAnalyzerWrapper is not exported
Hi, I am on Ferret 0.9.3 and it seems to me that Ferret::Analysis::PerFieldAnalyzerWrapper is not available in ferret_ext. -- Sergei Serdyuk Red Leaf Software LLC web: http://redleafsoft.com -- Posted via http://www.ruby-forum.com/.
2006 Jun 02
3
Advice, why value_before_type_cast in FormHelper?
I am wondering why is in creating text fields with form_helper used value_before_type_cast instead of attribute value for field value? I set rails enviroment so date fields are in european format (dd.mm.yyyy) and would like to have same format in forms, but because of value_before_type_cast is called, form fields are filled with ''yyyy-mm-dd'' or timestamp integer, etc.
2006 Feb 19
2
possible rails -> postgresql bug
Hi I have a problem accessing an array field in a Postgresql database. Here is the table definition. View "neil.flashing_codes" Column | Type | Modifiers -------------+-----------------------+----------- code | character varying(10) | description | text | folds | integer[] | View definition: SELECT
2006 May 17
1
Ferret causing "out of memory"
I am a bit puzzled. I am having issues with memory leaking away. It seems to be related to searching documents by ''id'' column value. This is what I am doing: cached_annotations = Ferret::Index::Index.new(:path => "#{RAILS_ROOT}/db/ferret/tmp/annotations", :auto_flush => false) 100000.times { |x| doc=cached_annotations[x.to_s] } Every 100000.times eats 100MB
2006 May 19
1
imdex.update is 10 times slower than index.add_doc. Normal?
Hi, I am seeing that doc = index[''mykey''] index.update ''mykey'', doc is about 10 times slower than doc = Document.new doc[''id''] = ''mykey'' index << doc It looks like #update is _much_ slower that #<<. Is it as expected? Sergei. -- Posted via http://www.ruby-forum.com/.
2006 Apr 03
1
debugging RJS output
Hi, Is there a way to log RJS output in development.log? Thank you. -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
3
STI and ActiveRecord attributes unprotected
Hi, This does not seem to be covered anywhere. Since base class extends ActiveRecord with a table that has fields for all heirs, would that mean that any heir class can access any of those attributes, including ones that belong to other heirs? Or I am missing something? -- Posted via http://www.ruby-forum.com/.
2020 Aug 15
5
Supporting libunwind on Windows 10 (32bit; 64bit) for MSVC and Clang
On Sat, Aug 15, 2020 at 8:39 PM Martin Storsjö <martin at martin.st> wrote: > Hi, > > > On Sat, 15 Aug 2020, Ivan Serdyuk wrote: > > > Just as Shoaib said, libunwind only is useful in environments > > that use > > the Itanium C++ ABI - there's really no use for it in an MSVC > > context > > (either using MSVC or
2006 Jun 15
3
best updating method
Hi All, I have a Ferret index containing some cached RSS feeds. I have a nightly cron script to cache the feeds, and I''d like to update the index with the latest feeds. I see the Index class has an update method, but I can''t work out how to get the id of the relevant document to pass in. Lets say I have a file called "google_news.xml" I want to go:
2006 Mar 10
14
Oracle Date type errors rails on edit
I have a table with "expires_on" a DATE field. "Show" and "Destroy" work, but "Edit" errors: /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:150:in `select_hour'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:149:in `select_hour'' It only happens when
2006 Jul 18
2
Turn element hidden by default (ajax question)
(this is my first post on the ruby forum. If this is not the right place for this type of question please let me know). Ajax question I have a checkbox that toggles the visibility of another element (a text field) with the code: --- <p><label for="checkbox">Appear!</label> <%= check_box :object_name, :method, :onClick =>
2006 Jun 20
7
Any fast way to update non-indexed fields?
Hi, >From looking at Ruby sources it seems that every update method deletes and reinserts documents. It makes sense if indexed fields are changed but what if it is not the case? It would speed up update a lot indexes did not have to be updated twice for nothing. Any quick way to do it? -- Sergei Serdyuk Red Leaf Software LLC web: http://redleafsoft.com -- Posted via
2007 Mar 18
7
How to get more informations about an association at runtime
Hi all I''m working on a Custom Formbuilder. I want it to create me with a single method call checkboxes for a given HABTM association. My model looks like this: [code=ruby]class Member < ActiveRecord::Base has_and_belongs_to_many :preferred_music_styles, :class_name => ''MusicStyle'', :join_table =>
2020 Aug 16
3
Supporting libunwind on Windows 10 (32bit; 64bit) for MSVC and Clang
Martin, good to hear from you. Thanks for the effort - I will test on 32bit and 64bit Windows 10. I will report ASAP. Ivan On Sun, Aug 16, 2020 at 8:42 PM Martin Storsjö <martin at martin.st> wrote: > On Sat, 15 Aug 2020, Ivan Serdyuk wrote: > > > > > > > On Sat, Aug 15, 2020 at 8:39 PM Martin Storsjö <martin at martin.st> wrote: > > Hi, > >
2007 Apr 09
4
How do i switch off error wrapping for a specific field?
Hi, i have some issues with the default rails error wrapping. It wraps errors in a div with class ''fieldsWithError'', which is not good practice in my eyes. Adding a class ''error'' to the field would be much nicer. My solution to the problem: build your own FormBuilder. Funny enough, i found no (nice) possibility to switch error wrapping off while using the
2008 Jan 31
3
presenting validation errors via fbml?
Hi Facebookers, Is there a helper or suggested approach for presenting validation errors on an fbml form? Something to translate rails error markup to fbml:error markup? thanks Joel
2006 Apr 08
2
ActionView::Helpers::FormHelper instance methods should take an object reference rather than an object_name.
Hi ActionView::Helpers::FormHelper methods (e.g. #text_field, #check_box...) take object_name as an argument. From this argument they infer a name that is supposed to contains the reference to the relevant object. I can''t see why the FormHelper methods were designed that way. Compared to simply passing them a reference, the current way seems too complicated and an invitation to problems