Displaying 20 results from an estimated 1000 matches similar to: "Newbie Trouble with RubyOnRails Bible"
2009 Sep 23
5
Overriding AR read/write_attribute - Overridden write_attribute Is Never Called
Could someone explain this?
#config/initializers/ar_attributes.rb
module ActiveRecord
module AttributeMethods
alias_method :ar_read_attribute, :read_attribute
def read_attribute(attr_name)
p "read_override"
ar_read_attribute(attr_name)
end
alias_method :ar_write_attribute, :write_attribute
def write_attribute(attr_name, value)
2009 Aug 28
2
Association extension method
In my application a user working at a dropzone can manipulate
transactions against customer accounts. Here''s my models:
class Transaction < ActiveRecord::Base
belongs_to :account
end
class Account < ActiveRecord::Base
belongs_to :dropzone
has_many :transactions
end
class Dropzone < ActiveRecord::Base
has_many :transactions, :through => :accounts do
def
2009 Sep 24
2
Calling ActionView from uninheriting class
Hi Gurus, I have a class, specified in models cart.rb, which doesn''t
inherit from anything--it''s just a container
class Cart
...
I just discovered I can''t call number_to_currency in that class. Any
idea how to "include" it in my code? I tried
ActionView.number_to_currency without luck. I could kill a few lines
of non-DRY regexp code in cart.rb if I could
2009 Oct 04
1
circular relationship - habtm
So I have 2 models: Picture and Comment.
Pictures have many Comments, but I''d like for users to be able to post
Pictures in Comments, so Comments will have one Picture (possibly).
This creates a kind of circular relationship it looks like, and the
only way I could think of to implement this is with
has_and_belongs_to_many. Am I right, or is there a better way to do
this?
2008 Apr 25
2
Can't Understand Why This Works
I have 3 methods:
def add_to_cart
# do some stuff
redirect_to_index
end
def empty_cart
# do some stuff
redirect_to_index("your cart was emptied")
end
def redirect_to_index(msg = nil)
flash[:notice] = msg if msg
redirect_to :action => :index
end
How come the flash notice works if I''m setting msg = nil? For example,
if I''m in empty_cart and pass
2009 Jul 16
9
Please help me understand how arrays are translated in rails
I''ve spent hours researching the subject and have tried many test
sequences in IRB, and rails console but I''m just having trouble making
headway into what is probably a very easy subject.
I understand arrays with at least 4 other languages but with Ruby I
haven''t found a mental connection with how I can assign variables to
arrays..
Take for example:
def
2006 Jul 31
2
[UPDATE] More info on RubyConf 2006 registration
Hi --
Registration for RubyConf 2006 is still scheduled to open on August 2,
in the early evening Pacific (US West Coast) time.
Also, there''s more info at http://www.rubycentral.org/conference
(e.g., the fact that this year we''re only taking credit cards, etc.).
David
P.S. Any LA area Rubyists around? I''ll be there this week doing Rails
training.
--
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/.
2008 Apr 29
10
Better way to remove value from list??
I''ve got a field in a database that contains a string of ids.
I want to be able to remove an item from that list and save the list
again. The only way I saw how to do this was to convert it to an array
and back to a string again.
The variable names are for an example.
This code works, but I don''t think that it''s efficient. It''s all in my
controller.
2009 Mar 16
5
Would like to run PC Study Bible
Would like to run PC Study Bible ver. 2 from BibleSoft on Linux. Research has led me to WINE. I am new to Linux, have Mandriva 2009 installed. I just DL'ed WINE for Mandriva 2009, and got it going. I tried to install PC Study bible from CD, no dice. I then copied the entire contents of PC Study Bible folder from a windows computer to flash drive and copied it to Linux computer. Still
2005 Mar 26
1
PC Study Bible
PC Study Bible 4.2B and 4.2C have problems with the menus which are
severely vertically compressed.
Screenshot of problem:
http://narnia.dnsalias.org/wine/PC%20Study%20Bible%20compressed%20menu%20flaw.png
I am using Fedora Core 3. I tried all the winehq WINE RPMs between
December and March. I think I used sidenet (not winetools) to
install IE. IE and other programs work OK.
The PC Study
2010 May 07
2
Asterisk Bible?
Hi Folks,
Is there a generally accepted Asterisk bible for current versions? I
poked around the forums and there didn't seem to be a real consensus,
and there are lots of options out there. I need something that focuses
on Asterisk dialplans and config files, not a linux primer. I'm looking
for dead-tree rather than online documentation.
Thanks,
Tim
2006 Jan 07
3
Can not install my bible program
I am very new to Linux but am enjoying it and liking it very much. I am up and running on debian sarge. Everything has been smooth except for one problem.
I am invested in the Logos Bible Program and am trying to get it to run with wine. It gives me a textbox that says it must run on windows 98 ver or higher. I do not know what else to do.
I am a minister and must use this program. What do
2010 Nov 08
1
Black text background in TheWord Bible program and wine
I run The Word Bible study program in Ubuntu 10.10 32 bit with ASUS K50IJ. The problem is, that the text shows black (the background is black, and the text is unreadable because of that), but only the longer verses.
May be, that the video driver couses this problem? Intel GMA X4500M?
Thanks, Attila [/img]
2009 May 29
1
Book Shelf app in 'Ruby on Rails Bible' book
I''m trying to follow through with the Book Shelf app that''s in the
''Ruby on Rails Bible'' book and I''m at a point where I''m trying to
install Ruby/Amazon. I downloaded the Ruby/Amazon and extracted it as
instructed. Now I''m at the step where I need to drop into a Ruby
console to verify the Ruby/Amazon installation.
In the console I
2008 Oct 05
3
Available Memory Mapping Space (PC Study Bible 5)
I'm running PC Study Bible 5 through Wine. It works pretty fine, only need to install Gecko, which I did through winetricks, and change the windows version to Windows ME or earlier (98, 95, etc.).
However, due to the large number of references used in the program (and the fact that ALL of them are loaded to memory on startup), the program gives me this warning:-
"Exhausted Available
2007 Sep 21
1
OT: packaging Bible posted to usenet as CHM
Maximum RPM has been posted to usenet as a compiled help file (CHM)
the site http://www.rpm.org/max-rpm
was recursively downloaded using
>wget -m <url>
FAR, by Helpware, was used to build the CHM (WinXP). GIMP (linux) was used to make the cover graphic.
the NZB is here
http://www.tlviewer.org/max-rpm.nzb
To see which usenet group and grab with Pan, look inside the NZB.
the command
2010 Oct 23
0
Re: Available Memory Mapping Space (PC Study Bible 5)
2 years later, and I thought to try this out again (been using e-sword happily). This time due to more error messages added (I think) to verison 1.3.5 I figured out I had to add a higher ulimt.
Added "ngoonee hard nofile 32000" to /etc/security/limits.conf and restarted
Installation didn't work on wow64, needed WINEARCH=win32 when actually creating ~/.wine before it would work
2006 Apr 14
7
How to call a java function in rubyonrails method
Hi everyone,
I''m Italian and sorry for my english mistakes...
I''m developing a web-site using rubyonrails.
It''s REALLY COOL!
But I''m obliged to re-use some javascript functions.
Do you know where I can get the right documentation (and examples) in
order to integrate these two different environments?
Thanks,
Matteo.
--
Posted via http://www.ruby-forum.com/.
2011 Aug 03
14
[root :to => "home#index"] not working
I have done the changes in the file config/routes.rb as mentioned in the
Rails Guides tutorial, but when I try to open:
http://localhost:3000
the page is not opening. It is giving error.
--
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