search for: martindemello

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

2006 May 19
1
ldap authentication and useradd
we''re in the process of setting up an openldap server, for unified unix and webapp authentication, and i''m trying to find a good equivalent of adduser that takes care of generating unique unix numerical uids. what are people using for this? [i''ve googled around and found http://prope.insa-lyon.fr/~ppollet/ldap/useradd.pl but it''s dated 2000] martin
2006 Apr 26
3
acts_as_taggable gem: deleting tags
I have the following quick-and-dirty hack in my model: def after_destroy # search for orphaned tags and delete them orphans = Resource.tags_count :count => ''= 0'' orphans.keys.each {|tag| Tags.find_by_name(''tag'').destroy} end It''s nice from a readable code perspective, but it seems inefficient - is there some way to do this with only one
2006 Jan 22
1
direct sql "delete from"
I was thinking, if I don''t manage to figure out the problem with acts_as_taggable, that I could untag objects via a direct SQL DELETE on the tag join table (something like "where tag_id = tag_to_delete and user_id = current_user"). Are there any dangers to this approach? martin
2007 May 23
1
rspec wiki?
Is there a wiki around anywhere? martin
2004 Mar 15
0
Re: [OT] outwit - unixlike tools for windows
"Martin DeMello" <martindemello@yahoo.com> wrote in message > Looks like a *very* useful addition to the windows toolbox - contains > programs to manipulate the clipboard, registry, ODBC layer and a few > other windowsy things using the unix ''take input from other programs, > format output so it can be pip...
2006 Jan 22
2
acts_as_taggable: weird SQL problem with untagging
Setup as follows: class Resource < ActiveRecord::Base belongs_to :user validates_presence_of :filename validates_uniqueness_of :filename, :scope => "user_id", :message => "already exists, try uploading another file or deleting first." acts_as_taggable :join_class_name => ''TagResource''
2006 Jun 22
12
invalidating a session on multiple login
How do I do the following: if a user is logged in, then opens another browser tab and logs in again (either as himself or as someone else), I want to invalidate the session in the first tab and throw up a "logged in from another browser window" screen. RIght now, user1''s session silently becomes a duplicate user2 session instead (from what I understand, sessions are bound to
2006 Apr 01
5
Upload a zip using a form and extract if afterwards on srv?
Hi all It like my visitors to be able to upload a zip file (or any other possible compressed file archive) to my server. After upload, my web app should extract the content to the server and delete the zip file. Is this possible somehow? I''m very thankful for help. Have a nice weekend, Joshua -- Posted via http://www.ruby-forum.com/.
2006 Aug 15
6
FileSystemWatcher - has any one done this?
I''d like to monitor a folder and when someone drops a file in there I can take the files name and add it to a database. My dream is to have a folder always being watched. and if someone drops a file or folders with files into that watched folder, I take the filename(s) and insert them into a db and if the files are in folder I use the folder name(s) as tags for that file. make sense?
2006 Aug 17
7
preventing multiple logins
I want to set my app up to prevent multiple simultaneous logins by the same user. What strategies are people using? Is it worth going to database session storage just for this? martin
2005 Dec 01
12
Difficult process of restarting SCGI, Lighttpd, Apache, sessions
I''ve managed to get Rails working using Apache->Lighttpd->SCGI. Restarting everything is really difficult. This appears to be the process: - stop apache - stop lighttpd - stop scgi - make sure scgi still isn''t running (it sometimes does) - if it is, kill it - delete all session files (they often cause permission errors) - start scgi - start apache - start lighttpd - cross
2006 Aug 15
0
filenames mangled on upload
I''m having problems with filenames being mangled when uploaded - usually truncated either upto or after some problematic character. Here''s an example: Filename in filesystem: s+o~1@#%^&*()_-=[]{};:''".txt uploadedfile#original_filename: s+o~1@#%^&*()_-=[]{} Is this a rails/cgi.rb issue or a browser one? I note that gmail''s "attach file"
2006 Nov 04
0
test/controller not using activerecord session
I''m using zentest and the test::rails class to do my controller testing, and the following line in my controller throws an error: session.model.user_id = user.id It looks like session is just a hash when testing, which would be well and good except that now I have to write if session.respond_to?(:model) session.model.user_id = user.id end which doesn''t feel right to me
2006 Jul 20
2
mysqld taking up 100% cpu
Every now and then, mysqld (5.0.22) jumps to 95%+ cpu usage and stays there. Seems to be a common issue, as far as google can tell, but details are alarmingly vague, and some people seem to suggest that it''s a bad query causing it. How do I go about determining if it''s something my application is doing? martin
2006 Jun 25
0
html.vim
http://www.infynity.spodzone.com/vim/HTML/ Neat set of vim macros for html editing. martin
2006 Apr 26
0
acts as taggable gem vs plugin
I''m currently using the acts_as_taggable gem; are there any advantages to switching to the plugin? martin
2006 Mar 22
3
database access from outside rails
I need to have a daemon read from and write to the database, and it would be nice to be able to use ActiveRecord and all the model/* files from my rails project rather than doing things the long way. Is there any recommended strategy for that? martin
2007 Jul 27
1
locals within a partial
How do you access something you''ve passed to a partial in the locals hash? <% for file in @file_list %> <tr id="file_row_<%= file[0].id %>"> <%= render_no_layout :template => "/shared/_file", :locals => { :file => file } %> </tr> <% end %> but when rendering the shared/_file.rhtml template it complains about
2005 Oct 07
0
Unshelved seeking Rails coder
http://www.overduemedia.com/blog.aspx?post=484 (No personal connection, other than being a fan of the comic)
2005 Oct 17
0
acts_as_taggable and per-user tags
I''m trying to add per-user tags to a simple app built atop the tiny_file example code, as follows: ------------------------------------------------------------------------------------------------- sqlite> .schema CREATE TABLE resources ( id INTEGER PRIMARY KEY, filename VARCHAR(255), user_id integer ); CREATE TABLE ''tags'' ( ''id'' INTEGER