Displaying 20 results from an estimated 10000 matches similar to: "find(:all) and find_all_<etc>"
2006 Oct 12
7
Evil Scaffold
I read the Amy Hoy''s presentation on why scaffold is not a good thing for beginners. For admin
application, is it ok to use scaffold?
--~--~---------~--~----~------------~-------~--~----~
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
2006 Oct 12
2
Too Many Mysql connections
In my app, for three models: foo,bar and baz, the database connection
is made to a different database and hence in model code:
class Foo < ActiveRecord::Base
establish_connection :diff_database
end
class Bar < ActiveRecord::Base
establish_connection :diff_database
end
class Baz < ActiveRecord::Base
establish_connection :diff_database
end
Now, the problem is, if is use the above
2006 Oct 16
5
New Rails Site: http://www.tanga.com
http://www.tanga.com is where it''s at. We''re planning on open sourcing
the e-commerce bits of it sometime in the near future. Any suggestions
on how to best do that? (plugin? generator?)
A non-video game will be offered for sale at 7 pm PST on Monday, btw.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2010 Sep 23
3
superclass mismatch for class Tempfile
I''ve been facing a problem when generating a model (or controller, ...). I''m
using rails 2.3.8 and ruby 1.8.7.
Has anybody been facing anything like this?
script/generate controller test
/usr/lib/ruby/1.8/tempfile.rb:12: superclass mismatch for class Tempfile
(TypeError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require''
2006 Jan 12
4
has_one relationship problem
I was wondering if anyone could see the error in this littte application
I have two models, User and Selection
Selection is an extension of the User model
so in the User model I have a has_one :selection
and in Selection I have a belongs_to :user
in my views, i cannot get @user.selection to work but @user works fine.
http://www.rafb.net/paste/results/GSBt1e61.html
Thanks,
r.b
2006 Apr 15
8
I need to send an email when something happens in my model...
but the model isn''t the right place to send mail from. That just
seems like pretty bad coupling, generating emails from within the
model. Or is that not a problem? On top of that, these emails need
to contain links back to my site...which is a bit of a pain in
ActionMailer, but I found directions on
http://wiki.rubyonrails.com/rails/pages/HowtoUseUrlHelpersWithActionMailer
however I
2018 Mar 21
1
selectFGR vs weighted coxph for internal validation and calibration curve- competing risks model
Dear Geskus,
I want to develop a prediction model. I followed your paper and analysed thro' weighted coxph approach. I can develop nomogram based on the final model also. But I do not know how to do internal validation of the model and subsequently obtain calibration plot. Is it possible to use Wolbers et al Epid 2009 approach 9 (R code for internal validation and calibration) . It is
2006 Jun 08
2
LoginEngine: undefined method `generate_security_token''
Hi there,
I''m trying to set up LoginEngine with Rails 1.1.2 on Ruby 1.8.4 on a
Windows XP box and the log is reporting:
undefined method `generate_security_token'' for #<User:0x39436a0>
Rendering user/signup
Rendered user/_edit (0.01600)
Rendered user/_password (0.01600)
Rails appears to be failing on key = @user.generate_security_token in
user_controller.rb in the
2009 Jun 11
2
Problem with new version of GlusterFS-2.0.1 while copying.
Hi,
I am having some problem with new version of
GlusterFS-2.0.1 while copying using "apache" user.
sudo -u apache cp -pvf zip/* test/
getting the message
cp: getting attribute
`trusted.glusterfs.afr.data-pending' of
`zip/speccok1ma131231824637.zip': Operation not permitted
`zip/speccok1ma131231824776.zip' -> `test/speccok1ma131231824776.zip'
No problem while
2006 Jun 30
5
Off Topic - Image size convertor?
I''ve been googling around, and have found a lot of tools to convert
images to the right pixel size - anyone have a good command line based
one for linux?
Also, how do you issue a command from a rails app?
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Dec 07
2
Quota Display with Horde and LDAP
Hi All,
I am using dovecot-1.0.rc15 wth LDAP authentication configured. My
webmail is Horde/IMP.
While logging in, Horde gives `Unable to retrieve quota' message,
instead of the usage report. capability string is:
OK [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS AUTH=PLAIN]
Dovecot ready.
There is no QUOTA shown
2007 Mar 26
1
outbound call
HI All,
I am new to asterisk. i want to make outbound calls from asterisk. I tried
with many times with the given settings but in vain
This is my scenario:
I have a *user A* who has registered with sip server(ONDO), I made
asterisk
to register as a sip client with ONDO, I want to make a call to user A
from
an extension.
My configurations
sip.config
[general]
context=default
2005 Aug 05
2
Phone interface hardware
--- Raja Chidambaram <raja_chidambaram82@yahoo.com>
wrote:
> Date: Wed, 3 Aug 2005 06:27:05 -0700 (PDT)
> From: Raja Chidambaram
> <raja_chidambaram82@yahoo.com>
> Subject: Phone interface hardware
> To: Asterisk-Users@lists.digium.com
>
> Hello All,
>
> We are in the process of putting together an asterix
> based phone network in our office. The
2011 Oct 11
10
Create Two objects at the same time
I have user model and referral model. Referral model has user_id as
field.
Now when a new user is created, I need to call referral#create as well
and pass it the id of the newly generated user to user_id of referral
model. How can I do that.
--
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
2018 Mar 18
1
selectFGR - variable selection in fine gray model for competing risks
Dear All,
I would like to use R function 'selectFGR' of fine gray model in competing risks model. I used the 'Melanoma' data in 'riskRegression' package. Some of the variables are factor. I get solution for full model but not in variable selection model. Any advice how to use factor variable in 'selectFGR' function. The following R code is produced below
2009 Jul 04
9
prevent orphan records
If I have
belongs_to :user
Do I need to have
validates_presence_of :user_id
?
Does Rails validate the presence of :user_id automatically if I have
belongs_to :user?
In other words, does Rails prevent against creating orphan records that
belong to non-existent users?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 15
6
view code regular expression
I''m lost on regular expressions to begin with...
I''m trying to fix a value to one of 4 radio buttons as there will be
value of either 1,2,3 or 4 in @roles_users...
<TD><input type="radio" id="roles"
name="case_managers[case_manager_name]"
value="Case Manager Admin"
<% if =~ @roles_users /1/ checked =
2007 Dec 19
6
thread_pooling sleeping
I''m trying to run a single worker that could perform a periodic task
for a given user.
>From a controller, I imagine something like:
def start_job
MiddleMan.ask_work(:worker => :foo_worker, :worker_method => :perform_task,
:data => { :user_id = current_user.id })
end
def check_job
@status = MiddleMan.ask_status(:worker => :foo_worker)[current_user.id]
end
2009 Apr 29
7
problem with nil.user
Hi all, I''ve put new code into my app so that an administrator will have
extra privileges (administer users, edit pages). The error is:
''Couldn''t find User without an ID''
So the app is looking for a logged in user when the homepage is
accessed.
Heres my code:
site/index view:
<% if is_logged_in? and logged_in_user.has_role?(''Moderator'')
2020 Oct 15
1
Dplyr question
Hi All,
Trying to get familiar with dplyr so I have a basic question:
How to summarise sum(Values) per species, maintaining Code column (each species has a Code):
Species Values Code
1 Acanthocybium solandri 33 LC
2 Makaira nigricans 20 VU
3 Makaira nigricans 20 VU
4. Makaira nigricans