Ooops, just realized my subject said Computer and not Computed. I
guess no one else has run into this or seen it as a problem?
tony
On Aug 28, 7:25 pm, Tony tony.cassan...@gmail.com wrote:
Hey all,
I've been playing around with special relationships (specifying the
select, etc) on my
I have written the following codes:
uri = URI.parse(page_url)
response = Net::HTTP.start(uri.host, uri.port) do |http|
http.get(uri.request_uri, headers)
end
How can mock it with different uri.request_uri and returns different
response?
Thanks in advance,
Richard
you need to put javascript function in parent page from where you are
calling the partial
N a R e N
On Sat, Aug 29, 2009 at 10:21 PM, RVince rvinc...@hotmaile wherent pagwrote:
I have the following partial, listed at the bottom of this post. It
has a Javascript function with it, and a
Dear All,
I think Ruby and JRuby both have their advantages. It depends on the
environment which one is easier to integrate and maintain.
In a typical Linux-Apache-(Postgres|MySQL)-Ruby environment JRuby with
its additional requirement of Java comes with some
painful extra cost, which can
Well yes - you still need to write the accessor methods to store you
instance variables (attr_accessor is probably enough).
Fred
That makes sense. Thanks.
I had my JavaScript thinking cap on when I was doing this... thinking
to create accessors out of thin air.
I also just found out that
2009/8/29 bgumbiker bogumil.bial...@gmail.com:
Hello,
Does anyone know how to use error_messages_for with remote_form_for?
Here is my code:
%= error_messages_for 'quotation' %
div id=quotation_form
% remote_form_for(Quotation.new, :url = { :action =
send_quotation }) do |f| %
2009/8/29 Tony tony.cassan...@gmail.com:
Hey all,
I've been playing around with special relationships (specifying the
select, etc) on my models and trying to get Rails to return the
results of database computations as part of an association. I've got
one model representing an object and
2009/8/30 CoolAJ86 coola...@gmail.com:
Well yes - you still need to write the accessor methods to store you
instance variables (attr_accessor is probably enough).
Fred
That makes sense. Thanks.
I had my JavaScript thinking cap on when I was doing this... thinking
to create accessors out
I am using HAML, i've been using it since quite sometime, but I haven't
worked with actually deploying applications to web hostings.
Currently I am trying to host my application to a hostmonster webhosting
that I own, but as I ssh to the server and try to do a rake gems:install or
rake db:migrate
Hi,
How do I configure my rails app for a custom gems directory ?
My hosting tells me that I need to add this to my scripts :
$:.push(/home/concptpl/ruby/gems)
But that seems to be for independent ruby scripts, how to I configure rails
accordingly ?
Thanks Regards,
Dhruva Sagar.
Ogden Nash
On 30 Aug 2009, at 09:17, Colin Law wrote:
2009/8/30 CoolAJ86 coola...@gmail.com:
Well yes - you still need to write the accessor methods to store you
instance variables (attr_accessor is probably enough).
Fred
That makes sense. Thanks.
I had my JavaScript thinking cap on when I was
I seems that both gems haml and haml-edge create a script named haml.
Unfortunately, the scripts are not identical.
$ diff haml.script haml-edge.script
5c5
# The application 'haml' is installed as part of a gem, and
---
# The application 'haml-edge' is installed as part of a gem, and
2009/8/30 Frederick Cheung frederick.che...@gmail.com:
On 30 Aug 2009, at 09:17, Colin Law wrote:
2009/8/30 CoolAJ86 coola...@gmail.com:
Well yes - you still need to write the accessor methods to store you
instance variables (attr_accessor is probably enough).
Fred
That makes sense.
From http://www.rubygems.org/read/chapter/3
If a user does not have access to the standard installation location
(typically /usr/local/lib/ruby), then they have the option of
installing RubyGems in a alternate location.
Note that if you can’t install RubyGems in the standard location, then
you
Can anyone please advise on how to send emails in HTML format instead
of plain text?
On Aug 29, 7:28 pm, Ritvvij ritvi...@gmail.com wrote:
Ya,,,
Controller Code
def sendmail
recipient = params[:email][:recipient]
subject = params[:email][:subject]
message =
Lots of ruby/rails developers are Mac users so I thought this might be
of interest here.
Here are some bumps I've had in the upgrade.
1) If you are using any macport installed software, get a list before
you upgrade:
$port installed myports.txt
You're going to need to get the latest
Maybe this is useful
http://forums.site5.com/showthread.php?t=18522
On 30 авг, 06:44, Colin Law clan...@googlemail.com wrote:
2009/8/30 Frederick Cheung frederick.che...@gmail.com:
On 30 Aug 2009, at 09:17, Colin Law wrote:
2009/8/30 CoolAJ86 coola...@gmail.com:
Well yes - you
If I do a :collection = call, what exactly am I asking Rails to do..
You are enabling a local variable in your partial with the same name
as the partial. The variable name will be singular and will be
initialized to each of the values that :collection contains.
Here's an example:
Rick Lloyd wrote:
Do you have mysql installed?
Yes
What happens when you type: mysql -- version
mysql Ver 14.12 Distrib 5.0.67, for suse-linux-gnu (i686) using
readline 5.2
How about when you type: which mysql_config
i.e.: which mysql_config
/usr/local/mysql/bin/mysql_config
Yes but I need to know how to call it.. I would call it onload= in the
html options, but it is not loading -- it is rendering a partial. So
what is the event call that will have it be called when the partial
reloads? -RVince
--~--~-~--~~~---~--~~
You received this
I'm not sure if it's still the case as I haven't tried snow leopard
yet but...
I noticed with the transition from tiger to leopard that Apple
replaced my /usr/local with a new empty directory. Thus everything
that used /usr/local as its' base directory (typically all FSF code)
was eliminated
On Sun, Aug 30, 2009 at 10:16 AM, Rickrichard.t.ll...@gmail.com wrote:
Related to snow leopard, does XCode still come with the OSX
distribution?
Yes, it's on the disk. And easer to find than it was on the Leopard
(or maybe it was Tiger) where the additional installs folder was
scrolled off the
Hi,
I installed snow leopard on my machine and my ruby on rails project
stopped working... When I tried
script/server
I this error
Booting WEBrick
= Rails 2.3.3 application starting on http://0.0.0.0:3000
All is broken on my computer after snow leopard. Sphinx doesn't work,
ImageMagick doesn't, rmagick doesn't, mysql plugin has failed and
quite possibly more things.
All besides rails work much better than before.
Trausti
On Sun, Aug 30, 2009 at 4:24 PM, Rick DeNatalerick.denat...@gmail.com
So I haven't read too much about the snow leopard changes but is it
possible that the executable format (or dynamic link format) has
changed? Why would everything stop working?
On Aug 30, 10:24 am, Rick DeNatale rick.denat...@gmail.com wrote:
On Sun, Aug 30, 2009 at 10:16 AM,
Did you try k...@metaskills.net? That's the email at the github site.
On Aug 29, 6:44 pm, Wes Gamble rails-mailing-l...@andreas-s.net
wrote:
Is there any place that I can get versions of the SQL Server adapter for
Rails that are = 2.1.0?
I've looked athttp://github.com/rails-sqlserverand
Next time, try reading the documentation first. From the
ActionMailer::Base docs:
To send mail as HTML, make sure your view (the .erb file) generates
HTML and set the content type to html.
class MyMailer ActionMailer::Base
def signup_notification(recipient)
recipients
Thank you.
On Aug 30, 11:41 am, Matt Jones al2o...@gmail.com wrote:
Next time, try reading the documentation first. From the
ActionMailer::Base docs:
To send mail as HTML, make sure your view (the .erb file) generates
HTML and set the content type to html.
class MyMailer
The Summary object you've described doesn't sound like a proper
ActiveRecord object - is it actually persisted to the database? It
sounds like you'd be better off just defining a non-AR model (maybe an
OpenStruct) for the summary. It's not going to help with preloading,
but you didn't state if
Hi,
I will deploy my sites with Passenger.
I develop on windows with Instantrails so I should now use vmware if I
want to have passenger also used during development. But is it really
needed? Does it make much difference if I use Passenger or not for the
development environment?
Thanks.
--
I will deploy my sites with Passenger.
I develop on windows with Instantrails so I should now use vmware if I
want to have passenger also used during development. But is it really
needed? Does it make much difference if I use Passenger or not for the
development environment?
I don't use
On Aug 30, 8:54 am, Rick richard.t.ll...@gmail.com wrote:
So I haven't read too much about the snow leopard changes but is it
possible that the executable format (or dynamic link format) has
changed? Why would everything stop working?
For the 64-bit installs of SL, yes. Not the executable
Isak Hansen wrote:
On 5/23/07, Tirta K. Untario tkunta...@gmail.com wrote:
t.column email, :string
def username=(user)
@username = user.downcase
end
But it results in username being NULL in the table.
Any advice would be very helpful. Thanks.
AR model attributes
I tried this command
sudo env ARCHFLAGS=-arch i386 gem install pg
and I was successfully able to install the gem
However, I still cannot start the server.. Any ideas anyone
Thanks,
Jai
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You
On Sun, Aug 30, 2009 at 6:46 AM, RVincervinc...@hotmail.com wrote:
Yes but I need to know how to call it.. I would call it onload= in the
html options, but it is not loading -- it is rendering a partial. So
what is the event call that will have it be called when the partial
reloads?
Perhaps
I'm trying to chase down intermittent production performance problems.
I see entries like this in app log
Completed in 196ms (View: 22, DB: 7)
which is a fine start but I'm looking for details such cache-money hit/
miss and response time statistics. Is there any recipe for for
gathering more
Thanks Philip, I had the same impression and wanted to check with
others.
I would probably give it a try if I had OSX to get familiar with it. I
am S frustated with Vista that I might go for a Mac at some
point...
I do not feel like setting all the environment on ubuntu via vmware
You can do something like this (utilizing a Rails time method):
class Time
def self.today
Time.now.beginning_of_day
end
end
Time.today
= Mon Aug 31 00:00:00 +1200 2009
Regards
Kieran
On Aug 29, 8:24 pm, Fernando Perez rails-mailing-l...@andreas-s.net
wrote:
Time.today exists on
I would worry about changes to the Java language that would affect
JRuby. Ruby implementation is never going to be a big concern of the
Java devs, nor should it be.
On Aug 16, 1:45 am, AlwaysCharging goodg...@gmail.com wrote:
Why would anyone use ruby over Jruby? I'm admittedly a noob about
Date.today is part of Ruby standard library (not added by Rails).
jeremy
2009/8/30 Maurício Linhares linhares.mauri...@gmail.com:
Time has no today method, today is a Date method added by rails, as in
Date.today.
The method that looks like the same in time is Time.now.
-
Maurício
On Sun, Aug 30, 2009 at 11:17 AM, Philip Hallstromphi...@pjkh.com wrote:
I will deploy my sites with Passenger.
I develop on windows with Instantrails so I should now use vmware if I
want to have passenger also used during development. But is it really
needed? Does it make much difference if
Hi, here's my results for the various Ruby implementations:
Ruby 1.8.6:
Time.now
= Sun Aug 30 13:49:32 -0700 2009
Time.today
NoMethodError: undefined method `today' for Time:Class
from (irb):2
Date.today
= Sun, 30 Aug 2009
quit
Ruby 1.8.7:
Time.now
= 2009-08-30 13:51:31 -0700
Time.today
On Aug 30, 4:57 pm, Conrad Taylor conra...@gmail.com wrote:
Hi, here's my results for the various Ruby implementations:
Ruby 1.8.6:
Time.now
= Sun Aug 30 13:49:32 -0700 2009 Time.today
NoMethodError: undefined method `today' for Time:Class
from (irb):2 Date.today
= Sun, 30 Aug 2009
Thanks Jeremy,
I recently signed with a new hosting company and I'll be using
Passenger. I plan to work with several apps and Passenger is new to me.
I'm still on my way to deploy my first app (move it from somewhere else
actually) and since I know I have to fight first with rails 2.3.3 I
Hi, it's actually two different machines.
-Conrad
On Sun, Aug 30, 2009 at 2:08 PM, pharrington xenogene...@gmail.com wrote:
On Aug 30, 4:57 pm, Conrad Taylor conra...@gmail.com wrote:
Hi, here's my results for the various Ruby implementations:
Ruby 1.8.6:
Time.now
= Sun Aug 30
So I'd like to set up the below associations. An Event is a normal AR
model. Stat is a normal AR model. I want a special stat on Event
that is a DB computation (mostly just sums of each column) and a
summary of all the Stats for that Event. The Summary isn't persisted
and is marked as
On Aug 30, 5:08 pm, pharrington xenogene...@gmail.com wrote:
On Aug 30, 4:57 pm, Conrad Taylor conra...@gmail.com wrote:
Hi, here's my results for the various Ruby implementations:
Ruby 1.8.6:
Time.now
= Sun Aug 30 13:49:32 -0700 2009 Time.today
NoMethodError: undefined method
On Sun, Aug 30, 2009 at 4:50 PM, Jeremy Kemperjer...@bitsweat.net wrote:
Passenger absolutely rocks for development, particularly when you work
on multiple apps.
Add some local domains like yourapp.test to /etc/hosts. Then anytime
you want to hit your app, just load it in the browser. No
2009/8/30 Tony tony.cassan...@gmail.com:
So I'd like to set up the below associations. An Event is a normal AR
model. Stat is a normal AR model. I want a special stat on Event
that is a DB computation (mostly just sums of each column) and a
summary of all the Stats for that Event. The
As someone told me before, I need to Google more :\
--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe
Thanks for the quick response! I'm not familiar with the named
scopes. Will these work with preloading the records (I assume by
using (:include = [:stats])? I could end up with a ton of Events on
one page and I'd prefer not to have to fetch the summary for every
one. I also assume I'd
It's all in the title= I don't remember if xxx_width and xxx_height are
magic columns that paperclip would automatically fill if ImageMagick can
handle the upload. It seems no to me, but that would be so easy to
add...
--
Posted via http://www.ruby-forum.com/.
beacuse javascript functions in partial will only execuate when the
parent document is onload() -- not the partial itself on subsequent
loads of a partial.
On Aug 30, 3:04 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Sun, Aug 30, 2009 at 6:46 AM, RVincervinc...@hotmail.com wrote:
On Sun, Aug 30, 2009 at 2:51 PM, RVincervinc...@hotmail.com wrote:
beacuse javascript functions in partial will only execuate when the
parent document is onload() -- not the partial itself on subsequent
loads of a partial.
Sure they will, if they're invoked directly.
--
Hassan Schroeder
Do you still get the same error when trying to start script/server, or
did it change? Because the ARCHFLAGS setting should have worked indeed.
If it's still the same, I would try to uninstall the pg gem completely
first before reinstalling it the same way.
Jai Jk wrote:
I tried this command
You might want to try the paperclip mailing list:
http://groups.google.com/group/paperclip-plugin
I do remember coming across someone who had made a fork that stores
makes available the dimensions, but for the life of me I can't find it
now. If you find it, let me know ;-) I could use it.
Hi,
I see some code from some open source project.
in many of the view files(.erb) , I see the following statements.
Idont understand how they are interpreted..
are they comments, or shown on UI, or just executed?
[code]
%- column_div :type = :primary do -%
h2People Admin/h2
%=
Look at the rendered source to see the difference immediately.
%- strips whitespace in front of the tag.
-% strips trailing whitespace, including the newline.
This is useful for rendering plain-text emails without a bunch of
gibberish whitespace.
Best,
jeremy
On Sun, Aug 30, 2009 at 4:23 PM,
Peter De Berdt wrote:
On 09 Aug 2007, at 11:37, Ivor Paul wrote:
Ah, that's what I wanted to hear. Have you changed tiny to work
with Rails as backend? What would the approach be to do this?
Would you use the insertimage_callback option and to what would
you point that. Just looking
Maybe I'm missing something but I don't see any way to get eager
loading with the named scopes. I have many Event models each with
many Stat models. If I have to query each event to get the summary, I
still have the n+1 query problem. Maybe the best solution is to
define a second model
Hassan,
How do you mean -- how would you do that? Thanks, -RVince
On Aug 30, 5:55 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
On Sun, Aug 30, 2009 at 2:51 PM, RVincervinc...@hotmail.com wrote:
beacuse javascript functions in partial will only execuate when the
parent document
script
function doReset(){
document.getElementById(channelnotes).options.selectedIndex = 0;
document.getElementById(channelnotes).options
[document.getElementById
(channelnotes).options.selectedIndex].value=;}
/script
Hello RVince,
would you please try in this way:
On Sun, Aug 30, 2009 at 6:36 PM, RVincervinc...@hotmail.com wrote:
How do you mean -- how would you do that? Thanks, -RVince
div id=my_partial
something something
script type=text/javascript
someFunction(); // will execute on load and on each refresh
/script
/div
--
Hassan Schroeder
Hi,Man
I write some integration test,like follow
[code]
require #{File.dirname(__FILE__)}/../test_helper
class BrowsingAndSearchingTest ActionController::IntegrationTest
fixtures :publishers, :authors, :books, :authors_books
def
I have developed a rails app which used the ferret and acts_as_ferret
plugin,but I never deployed a rails application,I wonder in the production
environment,is it as easy as it is in the development environment?just
connect the server with ssh and type script/ferret_server -e production
start?
Jeremy Kemper wrote:
Look at the rendered source to see the difference immediately.
%- strips whitespace in front of the tag.
-% strips trailing whitespace, including the newline.
This is useful for rendering plain-text emails without a bunch of
gibberish whitespace.
Best,
jeremy
hi
i had ruby 1.8.7 in my system. (Ubuntu 9.04)
so in console when i type:
which ruby
= /usr/bin/ruby
ruby -v
=ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
now i have installed ruby 1.9 side by side to the previous one and
something goes wrong during that. now in console:
which ruby
Rails List wrote:
The %= error_messages_for 'quotation' % is always replaced by empty
space in html as 'quotation' at that time is nil.
Any idea how to make it work without setting 'quotation' variable in
the controller?
thanks,
bogumbiker
Try this
%= error_messages_for
On Aug 30, 2:34 am, Karl Brodowsky lis...@brodowsky.com wrote:
Dear All,
I think Ruby and JRuby both have their advantages. It depends on the
environment which one is easier to integrate and maintain.
In a typical Linux-Apache-(Postgres|MySQL)-Ruby environment JRuby with
its additional
you will have to install gem and all your gems using the new ruby 1.9
installation. The gem install is isolated to the ruby install.
On Aug 30, 10:12 pm, Abhishek Singh rails-mailing-l...@andreas-s.net
wrote:
hi
i had ruby 1.8.7 in my system. (Ubuntu 9.04)
so in console when i type:
which
Hi all, I am using radiant cms with multiple site extension and shared
layouts extension. My query is that how can i call the same controller
method from two sites. My intension is to use only one ruby app and
based on site domain process the bussiness logic as required. Looking
forward for the
On Aug 30, 3:32 pm, AGoofin amor...@gmail.com wrote:
I would worry about changes to the Java language that would affect
JRuby. Ruby implementation is never going to be a big concern of the
Java devs, nor should it be.
Changes to the Java languages are extremely unlikely to be anything
but
72 matches
Mail list logo