search for: alainravet

Displaying 20 results from an estimated 23 matches for "alainravet".

2006 Mar 29
5
EdgeRails: "undefined method `weight'' for #<Hash:
Hi all, I was playing with the sample project found on the Wiki at http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails , and everything was working fine, ... till I moved to EdgeRails : undefined method `weight'' for #<Hash:0x22c7150> (full error thread below) Any idea? Alain
2005 Dec 16
4
Parent Child together in input form
Hi all, I understand how rails is supposed to work when dealing with one entity input form. However, when I have a relation between two objects (composition): Customer(1) --------> (1)Address How can you create a inputform where both the properties of a Customer and Address can be filled in? Regards, Harm de Laat _______________________________________________ Rails mailing list
2005 Dec 18
2
[Bug?] in tests, @foo.bars_count <> @foo.bars.count
Example: if a ''foo'' has 3 ''bars'', bars_count == "0" # ERROR bars.count == 3 # OK It looks like a bug to me. Alain -- Posted via http://www.ruby-forum.com/.
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
2006 Feb 14
20
Adding payment to an app: how hard and risky is it?
Hi all. I have never implemented online payment and it''s the only thing that keeps me from accepting a project for a UK based client. (I must reply quickly!) While I can afford spending an extra week - or 2 - to learn/try/tune the payment system, I must be sure to succeed before I accept the contract. If you''ve already been through that path, any hints, links and/or
2005 Dec 21
7
Are there any disadvantages to using locomotive
Hi: I had some issues and so switched to locomotive. I find it awesome. 1 click and its done. My question - what disadvantages are there, if any? What do I lose by using such a convenient solution. speculation as well as facts are welcome but please define which you are putting forwards. Thanks in advance, bruce
2005 Dec 15
6
passing parameters to link_to OR better way to do this?
Hi All: I''m writing my 1st Rails app and I can''t seem to find the answer on the web or in the book. I''m making a table, and I want to be able to expand a filename. The code is basically as as follows below. In the last <td> entry, I want to call an action and pass in the test_results_path, which I will go and read a file and munge the data for a separate
2005 Dec 16
6
managing belongs_to fields in a form
Hi all, I cannot find a clean way to create/edit an object that ''belongs_to'' another one, just by using form fields. I always need to explicitely unassemble it, store the master id in a hidden field, and then refetch the master from its id, and put it back in the object. To summarize: I want to create a new member, for a given project @project= ... @member =
2006 May 17
13
Using NTLM for S.S.O. in Rails
Greetings all, To all the good souls that happen to know NTLM and Rails.... Short version: -------------- - I''m looking for server code to extract credentials through NTLM dialog with the client (IE) - I found nothing usable/useful (as they both implement the client side code) in - rubyntlm on rubyforge - lib ntlm-ruby by Jonathan Bastien-Filiatrau LONG version:
2006 Jul 28
0
How to detect and simply signal that the DB is/got down?
Hi all, If the DB server is down when the rails server starts, or if it gets down while the rails server is running, I need to - detect the problem - display a simple error message "DB is down: contact support". Inserting ActiveRecord::Base.retrieve_connection() at the very begining of ApplicationController will trigger an error - that can be captured - when the class is
2006 May 17
0
class filter: cannot call protected controller methods
Greetins all, I''m rewriting a filter from the method form to a class filter.(see below) Problem: some controller - redirect_to - and route - *_url - methods are protected (redirect_to, f.ex.), and cannot be called. Is this intended? Is there a solution workaround? TIA Alain BEFORE: ----------- before_filter :login_required, :except => [:welcome,:login] def
2006 Apr 01
1
piggybacking an action on an autocompleted field
Hi everybody, I''d like to add a custom action to be triggered after/when an autocompleted field has been/is beeing updated by the autocompletion process. I tried the obvious - a field observer -, but it doesn''t work (see code below). I know I could write the autocompletion code myself, but I wonder if there is a simpler/more elegant way? Any idea? TIA Alain The
2006 Apr 26
2
RJS and Greybox : executing the js in the parent window?
Hi all, Question: Can a child window manipulate its parent window with RJS? Example: In an application a parent/master window shows a list of records. When the users press ''edit'', a greybox windows pops up where they can update one item attributes. Problem: after the ''save'' and child window closing, the parent window still contains the old attributes
2006 Mar 08
0
combining STI + polymorphism + rich self HABTM : how to ?
Hi all, I need to model simple typed polymorphic relations: ''John'' [''works_for''] ''Bill'' ''John'' [''speaks_for''] ''Microsoft'' ''Microsoft'' [''hold_shares_of''] ''Apple'' I''m having a hard time combining : - S.T.I.
2006 Feb 20
2
OT: screencast Editor for MacOs X?
Hi all, On MacOS, we have SnapZ Pro to RECORD screencasts. Is there a comfortable - *1 - screencast Editor, like CamTasia on Windows? At the very minimum I want to cut parts of the movies, insert "slides" and superpose drawings (frames, arrows, ..) or text? Alain *1 : not FinalCut, obviously. -- Posted via http://www.ruby-forum.com/.
2006 Jan 03
1
must write '':controller => "/foo"'' because of "admin/bar"
Hi all, Because I place admin controllers in an "admin" subdirectory, I''m forced to use absolute controller names/paths whole over my app. => I can no longer write: .. :controller => "foo" .. :controller => :foo or .. :controller => "admin/bar I have to use instead : .. :controller => "/foo" .. :controller
2006 Jan 05
0
render :partial, accentuated characters and Ajax preview
Hi all, I added a textile preview Ajax - 1 - button to an edit page, and accentuated characters now show up corrupted (but only in the preview area) As - they are displayed correctly in the rest of the page, - they are still correct when they reach the ''preview'' controller , I guess "render :partial" is the culprit. Is there a way to tell render how to render
2006 Jan 21
1
clearing/expiring the ''index'' action.
Hi all, I''m having problems trying to expire the ''index'' action of a controller. In short, expire_action :action => ''index'' doesn''t work, but expire_fragment (url_for :action => ''index'').gsub(/\/index/,'''').split("://").last works fine and deletes the cached page as expected. I
2005 Dec 15
1
migration: counter cache & "reset_column_information"
To speed up <%= @project.members_count %> , I added a counter cache to the ''projects'' table with the migration below: def self.up add_column "projects", "members_count", :string, :default => "0" Project.reset_column_information Project.find(:all).each do |p| p.update_attribute :members_count , p.members.count
2006 Feb 17
2
plz register this mailing-list with gmane
Thanks in advance. Alain -- Posted via http://www.ruby-forum.com/.