Displaying 20 results from an estimated 20000 matches similar to: "Does Find also tell you a count of the array size?"
2006 Mar 30
3
Model.find(:all) where Model.association has more then 0 items?
Hi everyone,
I have a Department model that has_many people. How do I go about
finding all departments with more than 0 people?
Department.find(:all, :conditions => Department.people.size > 0)
That, of course, doesn''t work, but it was as close as I could come.
Thanks!
Sean
2006 Jul 09
8
find_all order question
How does one properly get find_all to grab the data from the DB table
ordered by a specific column?
For example:
@anglers = Angler.find_all
This code gets all the angler records and they are sorted in order of
the id field which is of course set as a primary key in the DB (mysql).
I''d really like to pull the data from the DB sorted in the order of
another field, for example
2006 Jul 11
3
LoginGenerator Killing Me ;)
OK I have dents in my head from beating on LoginGenerator, so if anyone
who has used this thing can shed a little light I would greatly
appreciate it.
It is installed and I have set it up on my User class. Folks can login,
logout, etc just fine. I have am not using the per method protection
model yet, as I am trying to migrate slowly ;)
What is broken though are all my methods that save or
2006 Jul 10
10
IE vs Firefox -- http:// matters?
I just noticed something interesting (or not) about getting to my RoR
app on the 2 browsers. I''ve tested it running Webrick or Mongrel_rails
and get the same behavior.
The app is at http://www.mydomain.com:myport#/app/list
Specifying that complete URL works fine in both browsers. However in IE
if you just specify www.mydomain.com:myport#/app/list I get page not
found. In FF the URL
2006 Jul 24
3
Confused on URLs to my Rails App
I need a VERY SIMPLE solution to get to my rails app. We have a
WHM/Cpanel linux server with numerous virtual servers on it. I have an
existing website called www.mydomain.com that lives in
/home/mydomain/public_html.
I have written a rails app called "test" that is in /home/mydomain/test,
and it''s rails "root" is therefore /home/mydomain/test/public.
I am an
2006 Jul 09
9
undefined method stupidity
I put some code in a before_save callback in the model file to alter
some fields that have dependencies in the DB.
I''d like to call a method in the controller file but I continually get
undefined method errors. I have specified Controller::methodname as well
to no avail. What am I missing?
--
Posted via http://www.ruby-forum.com/.
2009 Aug 18
2
Embedding lists in matrices and matrices in lists
Hi,
I'm new to programming, new to R and even new to mailing lists so please
be patient with me. I need to manage many matrices generated by an R
program. These matrices have different dimensions and I'd like to group
them somehow. The best way would be to have a big matrix (let's call it
database) where every element database[x,y] consists of a list of
matrices that all have the
2006 Aug 15
2
PHP files in myapp/public question
I am running mongrel and put some php code in myapp/public, but for some
reason they are being treated as html instead of being evaluated by the
php interpreter. What do I need to do to get these files treated
properly?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 07
7
file_column repository broken?
I really want to try out file_column but the repository seems to be down
for me. I added it to my repository list and script/plugin is unable to
see anything in it.
I downloaded an archive from the website but it is not clear to me which
files need to be installed to which subdirs of my RoR project.
Anyone else having this issue with the repository? I am able to see
other repositorys no
2009 Sep 25
8
Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???
any pointers / suggestions re cheapest Rails hosting where they give
you full access to Apache (to load modules etc)??? Can be a shared
platform, however not sure if there is a shared platform type hosting
service where they do give you such access?
2009 Aug 22
3
Help on comparing two matrices
Hi,
I need to compare two matrices with each other. If you can get one of
them out of the other one by resorting the rows and/or the columns, then
both of them are equal, otherwise they're not. A matrix could look like
this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 1 1 1 0 1 1 0
[2,] 1 1 0 0 0 1 0 1
[3,] 1 0 1 0 0
2010 Sep 27
3
Rails3 app deploy : how to ?
Hello,
I know many people are asking this kind of question. I searched in
this forum and some others in the web but i did found something clear
enough for my "ror''s power" (i''m not completly new but real
close ;-) )
Well, I''m developing my application on os x, i''m using svn (team
choice) for versionning but i will need to deploy on linux server
(with
2006 Aug 14
3
Need copy of Wiki Page on phpBB integration and signon
I am in Wiki hell thanks to the morons that are spamming the wili. I
went to check on the articles for integrating with phpBB as I was going
to code it today and it is gone. The back in time function doesn''t work
either. Does anyone have a copy of the wiki from this page?
HowtosDoSingleSignOnWithPHPbb
--
Posted via http://www.ruby-forum.com/.
2006 Jul 13
1
Where should method shared btwn controllers go?
I have a method I would like multiple controllers to share. Where does
it belong?
I have it in a file in lib for the moment. It seems it should be here or
in controller/application.rb.
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
2010 Jun 10
9
Rails3 beta4 + Ruby 1.9
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I
cannot save a record:
> rails console
Loading development environment (Rails 3.0.0.beta4)
ruby-1.9.1-p378 > g = Game.new
=> #<Game id: nil, player_id: nil, versus_id: nil, finished: nil,
created_at: nil, updated_at: nil>
ruby-1.9.1-p378 > g.save
NameError: undefined method `<=>'' for class
2009 Mar 30
1
where can find open source rails forum code?
Where can find open source rails forum code?
I found Beast but Beast maybe close or not update for long time.
Where can I find some good forum I can use
--~--~---------~--~----~------------~-------~--~----~
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 May 04
4
What do you use RJS for?
I''ve read an intro or two for RJS, but I don''t fully get what it may be
used for - AJAX? Please post what you currently use RJS for.
Thanks!
Joe
--
Posted via http://www.ruby-forum.com/.
2006 Jul 23
6
routes
My best guess at how to make this route
map.connect '':user'', :controller => ''user'', :action => ''profile''
makes my
link_to :controller => ''admin'', :action => ''index''
stop working ?
I''m needing urls like http://localhost:3000/username but without
breaking all my other controller index
2006 Jul 20
19
Recipes versus Ruby for Rails: what''s best after Agile?
For expats from other languages, what''s the next best step after the
Agile Web Dev book:
Rails Recipes or Ruby for Rails?
Thanks,
--
Austin
--
Posted via http://www.ruby-forum.com/.
2006 Jul 07
7
Sequencing control with edit method in CRUD examples
I have been playing with the cookbook type of tutorials building a fish
tournament scoring piece and am having a bit of a problem with a DB
field called "points" in my "catch" table that is not input by the user
but is calulated based on a "size" field that is input by the user.
I have the following in my catch_controller.db
def new
@catch = Catch.new
@fish =