Displaying 20 results from an estimated 29 matches for "matiassurdi".
2006 Jul 18
7
Observer not working
Help please.
I''m trying to observe a User class, but I can''t get this to work, the
after_create method never gets called... (the breakpoint never gets
called)
app/models/user_observer.rb:
class UserObserver < ActiveRecord::Observer
def after_create(user)
breakpoint
setting =
2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration?
I need to use it as part of my project, so, before start from scratch
with it I''d like to know if already is something out there.
Thanks.
2006 Jun 21
2
raw sql and columns order
Hi, I''ve a model with the following method:
def self.run(sql)
return connection.select_all(sql)
end
so, the value returned is an array of hashes... the problen is that the sql
command:
"select name, id from table"
and
select id,name from table"
returns the columns in the same order (name, id).
And in my view, I need to keep the order of the SQL command.
2006 Aug 02
7
String lenth limit
Hi,
I''ve seen some time ago a function which, given a string like "this is a
very long string" would return , for example limitin it to 10 chars "this
is a..." , but I can''t remember where..... I''ve searched throwth the apis
of rails and ruby itself and I can''t find it.
Thanks everybody..
2006 Aug 10
1
reusing previous code
Hi,
I have a couple of controllers, views, models and mailers for a given
functionality (for example, user registration). ?what is the best way to
share them between multiple applications so that I don''t have to copy them
over and over again?
Thanks.
2006 Jun 27
2
Using a different layout/styleshheet
Hi,
I have a view that I use to display and capture data. Once the user
has input the required data, I then need to be able to print the view.
I know that I can setup a stylesheet to take care of the page layout
but it is not clear to me how I will make the print view call the new
layout.
If anyone could clarify this or point met in the right direction, I
would be most grateful.
Regards,
Paul
2006 Jun 02
5
Firefox extension for ajax debugging
or similar...
Is there any extension for firefox so that I can view the source code of
ajax returned content?
Thanks everybody.
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi,
I'm running the following command for a remote host backup:
/usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z
--no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/*
--exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/*
--exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/*
--exclude=/home/gentoo/* --exclude=/mnt/*
2005 Dec 27
6
Best Environment for development
This is a newb question, and probably one that is a matter of taste
more than objective merit.
I''m working on a home server, running Linux [FC 4], hosting a website
[look for generocities.com shortly]. I have a delightful new Windows
XP Pro Dell Inspiron 9300 laptop.
What would the community recommend for the environment in which I develop?
I don''t mean technologies like RoR
2006 Jul 17
0
Global function
Hi,
I''ve got a simple function which I need to have available from all
controllers, views, models and mailers.
Wich is the best/correct place to put it?
Thanks a lot.
2006 Jul 21
0
Getting controller_name from inside an Observer
Hi,
Anyone knows if there is any way to get the controller_name from an external
Observer class?.
Thanks.
2006 Jun 08
0
Cleaner way to do this
is there a cleaner way to achieve this? // Is this the correct way?
def show_servers
@server_pages, @switch_servers = paginate :servers, :conditions=>["id in
(select server_id from server_interfaces where
server_interfaces.switch_interface_id in (select id from switch_interfaces
where switch_id = ?) )",params[:id]], :per_page => 20, :order => "name"
render
2006 Jun 10
1
two connections to the same database
Hi,
I want to let the users of my web app enter plain SQL commands (for
customized reports), so, I want them to do this under a read only mysql
user so that I ensure they won''t compromise any data. But the rest of the
application needs full r/w access.
So, how can I implement on the same app a second connection just for a
controller for example???
Thanks.
2006 Jun 11
1
Activerecord attribute without db column
Hi,
I''ve a model that is stored to the db, but just one of its atribbutes
doesn''t have a corresponding column on the table (it is used just for a
calculation and still requires validation).
I''ve been succefull by doing what is explained in
http://rails.techno-weenie.net/tip/2005/11/19/validate_your_forms_with_a_table_less_model
But I get an error of a non-existent
2006 May 12
1
ActionMailer without rails
Hi.
Could someone post here a simple example of sending a mail throught a
smtp server from ActionMailer but *outside* rails??
I mean, a simple script starting with:
require ''rubygems''
require_gem ''actionmailer''
#stuff that sends some text by smtp
I''ve been trying but I can''t get it to work.
Thanks everybody.
2006 May 20
2
Migrate database to a new one using migrations.
Hi,
I''ve an applicattion actually in production wich i wrote in php last
year. Now, I''m working on a new version in Ruby/Rails.
So, can someone tell me how can I generate a migration so that every
time I run it the "data" from the old db get''s copied to the new one??
Note that _I''ve already the schema, I want something that automatically
could
2006 May 31
2
Storing a NULL value from a radio_button
Hi, I''ve a boolean database field (tinyint(1)) wich allows nulls.
Then, I''ve something like this:
radio_button(''server'',''customer_has_login'',"NULL")
radio_button(''server'',''customer_has_login'',true)
radio_button(''server'',''customer_has_login'',false)
The problem is
2006 Apr 15
2
Users authentication & Autorization
Hi,
Is there any documentation about this??? any guideline to be started with??
I''m googled a bit, but I can''t find anything relatively serius about this.
Hope someone of you have a GURL (Good URL).
Thanks :-)
2006 Apr 17
0
AcctionMailer templates
Is posible to use helpers in ActionMailer templates???
When I do:
<%= link to ''my link'', :action=>''someaction''%>
in the mail template, I get the following error on the browser:
undefined method `url_for'' for #<AdminMailer:0x8ebdfcc>
Thanks.
2006 Apr 26
0
upload_progress
Hi,
Is possible to change the Default text "Upload starting..." when a file is
being submitted with this plugin???
I cant find the way to do that.
Thanks.