Displaying 5 results from an estimated 5 matches for "gabrukiewicz".
2007 Dec 20
4
object.send problem within ActiveRecord
I am using the send method in one of my active records ... executing a
method without any parameters works fine.. but when it comes to
parameters it says
ArgumentError: wrong number of arguments (1 for 0)
u = User.new
#works
u.send :firstname
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ''michal''
does someone know why? the rubydoc
2007 Nov 28
8
include vs. require vs. require_dependency
i am struggling a bit with all of them .. could someone be so nice a
describe me the exact differences, pros & cons of all of them ... thx a
lot!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2007 Dec 03
8
automatic 'verify :xhr => true' for methods ending with _xhr
hey guys,
i am writing a couple of actions which are only used with an xhr. I
''protect'' them all against a direct access with the ''verify'' method in
the controller
verify :only => ..., :xhr => true
it would be cool if the system would automatically recognize the xhr
actions and protect them ... i want to postfix methods with ''_xhr'' and
2007 Dec 27
9
how do you handle recurring tasks
i have several tasks which i need to be executed from time to time ..
some every 20 minutes and some only 1 time a day .. you know things like
e.g. clearing old sessions, deleting inactive users ..
how do you deal with stuff like this? cronjobs? how is your pattern for
such things ... thanks in advance
--
Posted via http://www.ruby-forum.com/.
2007 Dec 13
2
automatically strip values of activerecord attributes
i am doing a couple of times the following in my models
class User < ActiveRecord::Base
def name=(val)
write_attribute :name, val.to_s.strip
end
end
quite clear, it strips the name when setting it.
now the question: Is it possible to do something like the following ..
and if yes how could i achieve it
class User < ActiveRecord::Base
auto_strip :name, :street
end
thanks...
--