similar to: Good code?

Displaying 12 results from an estimated 12 matches similar to: "Good code?"

2006 Feb 01
0
ajax and creation of a list
The goal is to create the content of a list from a single page, with ajax. For instance, a person "has many" telephones numbers, a telephone number belongs to a person. During the creation of the person, at first a single input box is printed to insert a telephone number. The user has then to click on a button (add another number) or to edit the first box to make a second
2006 Jul 19
6
ActiveRecord::RecordNotSaved - bizarre behaviour.
Hi. I get a RecordNotSaved exception when trying to create a user record. The error: User Columns (0.005930) SHOW FIELDS FROM users SQL (0.000465) BEGIN SQL (0.000466) COMMIT ActiveRecord::RecordNotSaved (ActiveRecord::RecordNotSaved): ... As you can see, there''s no INSERT SQL generated, which is the root cause of the problem. In my user model, I have the following
2006 Feb 02
4
ajax insertion into a form
After an ajax insertion in the dom, it seems the browser don''t refresh its knowledge of the page. The source of the page is identical after the insertion, whereas the display is correct. The ajax insertion is used to add an input field. The added fields are ignored by the submission of the form. Isn''t it possible to do that, or maybe there''s a problem in my code
2006 Jul 11
1
instance vars in layouts
Hello List, The layouts contain the instance var @content_for_layout; is it possible that they may also contain the instance vars from a controller similar to the way a controller''s views do? cheers, - trav -- p [151,40,154,157,166,145,40,162,165,142,171].collect { |ii| eval ''"\\''+ii.to_s+''"'' }.join -------------- next part --------------
2010 Apr 07
0
Problems with no method error with rufus scheduler
Hi, I have a problem with rufus. I created a test.rb file in the /config/ initializers folder. test.rb require ''rubygems'' require ''rufus/scheduler'' scheduler = Rufus::Scheduler.start_new scheduler.each ''10s'' do puts "hey see you in 10seconds!" end works fine so far. Now I change it to: test.rb require
2009 Mar 26
0
Error On relative_url_root
I''m attempting to mash together Adva CMS'' Fckeditor and the Fckeditor plugin provided by Scott Rutherford. http://blog.caronsoftware.com/2008/6/21/fckeditor-plugin-0-5-1-released The Scott''s plugin has a controller than handles the Fckeditor file upload and browse, but it errors out on the following lines. def upload_directory_path uploaded =
2006 Nov 04
1
acts_as_tree repeats
Hello Railslist, I want to draw a simple single-table Acts_as_tree model. I''ve read some articles about it and read the API docs, and now I''ve got this running: in controller I have: --- def index @pages = Page.find(:all) end --- in the model for Page I have ofcourse: --- acts_as_tree :order => "position" --- in the helper I have; --- def
2006 Jul 12
1
odd habtm behavior? or is it me?
Hello List, I''m a bit spent on this problem, and my code might be whack. I seem to be encountering a problem where the primary key on a join table is not being resolved correctly. I will elaborate after some code bits. I am creating the join table using migrations, and relevant model code is this: class Post < ActiveRecord::Base has_and_belongs_to_many :records
2007 Oct 16
3
can''t define custom GIcon
Hi, I am having trouble getting custom GIcons to display. Here is the code in my controller: @map = GMap.new("map_div") @map.control_init(:large_map => true,:map_type => true) @map.icon_global_init(GIcon.new(:image => "images/APBox-20.png "),"ap_none") infoString = "Friendly Name: "+result.friendly_name+
2005 Sep 21
9
Ajax.Updater
Hi all, I was wondering if one could pull a completely separate web site into a div, e.g. <a href="#" onclick="new Ajax.Updater(''artifact'', ''http://www.vivisimo.com/'', {asynchronous:true, evalScripts:true, onLoading:function(request){Toggle.display(''message2body'')}}); return false;">&raquo;</a> it fails
2007 Mar 29
1
Extending the to_s method
Hi! I''m developing an localization plugin (just for my own purposes) and I wanted to extend the to_s method for the Time class. What I want to do: when someone does date.to_s(:short) that a localized version of the :short date is displayed. But I don''t know how to accomplish this. I know have this: class Time def to_s(option) print option.to_yaml
2017 Sep 04
5
SPNEGO login failed: An internal error occurred
Hi, I setup a test envirement on a dedicatet server. OS: debian stretch samba: 4.5.8 smbclient: 4.5.8 I set it up as DC, the provision work well, yes I've delete the smb.conf in advance. When I test kinit I got an kerberos ticket, but I've problems with smbclient either I use kerberos or password auth. Myabee someone could help me? my smb.conf: # Global parameters [global]