On 10 September 2010 05:41, Bob Smith bsm...@gmail.com wrote:
I'm trying to get a list of zip codes in my database with
zipstring = sprintf(select distinct zip from visits,households where
+
households.id=visits.household_id and visits.month='%2d' and
visits.year = '%4d' +
and
On Sep 10, 1:30 am, Jeffrey L. Taylor r...@abluz.dyndns.org wrote:
Quoting Frederick Cheung frederick.che...@gmail.com:
On Sep 9, 2:11 am, Jeffrey L. Taylor r...@abluz.dyndns.org wrote:
Is it possible to to freeze a single attribute of an ActiveRecord (Rails
2.3.5). Hopefully in a
I'm doing a manual (initial) installation of ruby 1.8.7, rubygems
1.3.7 and rails.
I'm pretty new at this. This is a windows installation.
I started by installing ruby-1.8.7, then downloaded rubygems-1.3.7 and
ran ruby setup.rb in the extracted gems directory I had created. These
seemed to go
.
On 9月10日, 上午5时28分, Ruby Rube li...@ruby-forum.com wrote:
Having a frustrating go at authenticating a user, pretty sure it must
have something to do with gem version conflicts, but I can't seem to
find a solution that works.
No matter what username password that is entered into the
If you know grails, there is a feature like this: % user.name? %
that prevents to chek if the value is null or not.
In rails view I have to do
% if user.name %
%= user.name %
% end %
to display user.name if it is not nil.
There is a shortcut or some feature like that in grails?
--
You received
If is it only during the installation of the ri documentation, you shouldn't
worry about it.
if you do a 'gem list' you can see all the installed gems.
On Thu, Sep 9, 2010 at 10:21 PM, Robin robinmalmquis...@gmail.com wrote:
I'm doing a manual (initial) installation of ruby 1.8.7, rubygems
user.presence ||
see http://rubydoc.info/docs/rails/3.0.0/Object:presence
On Fri, Sep 10, 2010 at 10:25 AM, Mauro mrsan...@gmail.com wrote:
If you know grails, there is a feature like this: % user.name? %
that prevents to chek if the value is null or not.
In rails view I have to do
% if
And if user can potentially be nil, you can also use
user.try(:presence) ||
This will avoid undefined method 'presence' for nil:NilClass errors.
On 10 Sep 2010, at 10:27, Christiaan Van den Poel wrote:
user.presence ||
see http://rubydoc.info/docs/rails/3.0.0/Object:presence
On Fri, Sep
I would like to give my users an opportunity to switch the application
into a sandboxmode, where it is possible to play with it without the
danger to insert junk into the database.
I guess, setting RAILS_ENV = 'development' works globally for the whole
server. Is there a possibility to switch a
Hi everyone,
I am trying to a cumulative sum on each page using will_paginate. I
don't want the sum of each page, but the cumulative sum. Here is an
example:
on Page 1 I have:
-
|date | in | out |
On 10 September 2010 09:25, Mauro mrsan...@gmail.com wrote:
If you know grails, there is a feature like this: % user.name? %
that prevents to chek if the value is null or not.
In rails view I have to do
% if user.name %
%= user.name %
% end %
to display user.name if it is not nil.
Not a
Msan Msan wrote:
If you know grails, there is a feature like this: % user.name? %
that prevents to chek if the value is null or not.
In rails view I have to do
% if user.name %
%= user.name %
% end %
to display user.name if it is not nil.
There is a shortcut or some feature like that in
I find hard to work with rest and custom actions.
I have an action
def logout
session[:user = nil
end
for controller user.
In my view I call %= link_to Logout', :action = 'logout'.
When I click on link the error is:
Couldn't find Ruser with ID=logout
My routes.rb has resources :rusers.
How
On 10 September 2010 09:25, Mauro mrsan...@gmail.com wrote:
If you know grails, there is a feature like this: % user.name? %
that prevents to chek if the value is null or not.
In rails view I have to do
% if user.name %
%= user.name %
% end %
to display user.name if it is not nil.
There
Is there any easy way of using something like current_page? method
from ActionView::Helpers::UrlHelper inside controller ?
I have routing like:
resources :addresses
resources :mailing_addresses, :controller = 'addresses'
And I would like to do a check in my controller that would look like
this:
Robert Pankowecki wrote:
Is there any easy way of using something like current_page? method
from ActionView::Helpers::UrlHelper inside controller ?
I have routing like:
resources :addresses
resources :mailing_addresses, :controller = 'addresses'
And I would like to do a check in my
Thanks Robert, yeah that's a silly thing to do :)
Colin I'll try doing the :conditions = [ 'timestamp = ? and
timestamp = ?', timestamp1, timestamp2 ] and see how it performs
thanks I should have thought of doing that.
radhames yeah it makes a lot more sense to do it in the db, just wrote
some
I have a weird issue .I am using simple captcha in forms in my rails
applications. If I am using one captcha in a web page I don't have any
problem. But I have a scenario of using three(3) forms in one page in
which all the three forms will have the captcha . So that when I
refresh the page the
Hi,
why don't you go for Ruby 1.9.2/Rails 3.0... I had different problems
installing rails on windows until I found the following link:
http://accidentaltechnologist.com/ruby-on-rails/running-rails-3-on-windows/
Dani
--
Posted via http://www.ruby-forum.com/.
--
You received this message
Hi,
Im not an expert, don't believe me! I would do this (after writing to
mailing list, was good idea!):
1. There must be some meetup or conference around you about Ruby or
Rails or Agile Development - go there.
2. Check if there is any Rails community around you - if not, than
other programmer
Here's the finished method thanks again Colin
def FilterUtils.get_readings_with_filters_applied reading_class,
meter_ids, timestamp_col_name, years,
all_conditions = Array.new
all_conditions += [meter_id IN (?), meter_ids] unless meter_ids
== nil || meter_ids.size = 0
years.each{
err , just add another connection to your database.yml file and create a
clone db , i dont remember who to switch environment without restarting the
webserver.
On Fri, Sep 10, 2010 at 4:44 AM, Fritz Trapper li...@ruby-forum.com wrote:
I would like to give my users an opportunity to switch the
anyway what you may be able to do is change the db connection.
On Fri, Sep 10, 2010 at 7:49 AM, radhames brito rbri...@gmail.com wrote:
err , just add another connection to your database.yml file and create a
clone db , i dont remember who to switch environment without restarting the
AR has a sum function.
On Fri, Sep 10, 2010 at 4:45 AM, Fidel Viegas fidel.vie...@gmail.comwrote:
Hi everyone,
I am trying to a cumulative sum on each page using will_paginate. I
don't want the sum of each page, but the cumulative sum. Here is an
example:
on Page 1 I have:
resources :addresses
resources :mailing_addresses, :controller = 'addresses' = this is
here confuses me, why not have another controller?
this will generate 7 restful action to a controller that has
already 7 restfulaction
but anyway it should be like this in you routes
:requirements
are you using racaptcha?
On Fri, Sep 10, 2010 at 6:43 AM, sam swaminadhank...@gmail.com wrote:
I have a weird issue .I am using simple captcha in forms in my rails
applications. If I am using one captcha in a web page I don't have any
problem. But I have a scenario of using three(3) forms in
*recaptcha
On Fri, Sep 10, 2010 at 8:02 AM, radhames brito rbri...@gmail.com wrote:
are you using racaptcha?
On Fri, Sep 10, 2010 at 6:43 AM, sam swaminadhank...@gmail.com wrote:
I have a weird issue .I am using simple captcha in forms in my rails
applications. If I am using one captcha
radhames brito wrote:
anyway what you may be able to do is change the db connection.
How to do this?
Does it work for a single session, while other sessions work in
production mode? Is it possible to switch the current session to sandbox
mode and back?
--
Posted via
Hi Radhames. Yea, the case you mention above would work. Except, since
you are suggesting I have a comment table on its own. Then I would
need to have a like and upload table on its own as well.
If I needed to list recent interactions (to list down a user feed), I
would have to union join the
Quoting BlueHandTalking j...@whidbey.com:
I am looking at getting a new Thinkpad with an i5 processor.
I was curious to what extent this would speed up developing a Ruby on
Rails
app. I am guessing that this depends to what extent multi-threading is
utilized,
but I am not sure---hence the
voidstar wrote:
Here's the finished method thanks again Colin
def FilterUtils.get_readings_with_filters_applied reading_class,
meter_ids, timestamp_col_name, years,
all_conditions = Array.new
all_conditions += [meter_id IN (?), meter_ids] unless meter_ids
== nil ||
Robert Walker wrote:
Rails 2.x:
:conditions = { timestamp_col_name = year_start...next_year_start }
CORRECTION:
conditions = { :timestamp_col_name = year_start...next_year_start }
^
\__ Forgot to make this a symbol
--
Posted via http://www.ruby-forum.com/.
--
what i am afraid that will be a problem are plug ins and gems, you could add
a filter in the action controller and stuff, but i think that the plguins
and gem may not follow
On Fri, Sep 10, 2010 at 8:16 AM, Fritz Trapper li...@ruby-forum.com wrote:
radhames brito wrote:
anyway what you may be
On Fri, Sep 10, 2010 at 9:09 AM, radhames brito rbri...@gmail.com wrote:
what i am afraid that will be a problem are plug ins and gems, you could
add a filter in the action controller and stuff, but i think that the
plguins and gem may not follow
On Fri, Sep 10, 2010 at 8:16 AM, Fritz
read this , this guy had your prbblem
http://www.mail-archive.com/rubyonrails-talk@googlegroups.com/msg45941.html
On Fri, Sep 10, 2010 at 9:09 AM, radhames brito rbri...@gmail.com wrote:
On Fri, Sep 10, 2010 at 9:09 AM, radhames brito rbri...@gmail.com wrote:
what i am afraid that will be a
Frederick Cheung wrote:
On Sep 9, 5:54�pm, John Chufar li...@ruby-forum.com wrote:
I still cannot see how to possibly pass a blob through ajax response, so
this is the my simple (NOT effective approach) versus memory storage.
I think the root of the problem you are grappling with is that
Ah thank you Robert I'd missed that condition in my tests (lazy!)
thanks
On Sep 10, 2:03 pm, Robert Walker li...@ruby-forum.com wrote:
Robert Walker wrote:
Rails 2.x:
:conditions = { timestamp_col_name = year_start...next_year_start }
CORRECTION:
conditions = { :timestamp_col_name =
On Sep 10, 7:52 am, radhames brito rbri...@gmail.com wrote:
you have a typo on your model name in controller.
On Fri, Sep 10, 2010 at 4:59 AM, Mauro mrsan...@gmail.com wrote:
I find hard to work with rest and custom actions.
I have an action
def logout
session[:user = nil
end
no, with what i showed you you can do
%...@user.comments.each |comment|%
%=h comment.content%
%comment.products.each do |product|%
%=product.name%
%end%
%end%
also
%...@product.comments.each |comment|%
%=h comment.content%
%comment.users.each do |user|%
Couldn't find Ruser with ID=logout
My routes.rb has resources :rusers.
the above means your user model has a diferent name than the one you are
usign
On Fri, Sep 10, 2010 at 9:40 AM, Sandy sandy.as...@gmail.com wrote:
On Sep 10, 7:52 am, radhames brito rbri...@gmail.com wrote:
you
radhames brito wrote:
read this , this guy had your prbblem
http://www.mail-archive.com/rubyonrails-talk@googlegroups.com/msg45941.html
Very interesting. Thanks a lot.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
Fritz Trapper wrote:
I would like to give my users an opportunity to switch the application
into a sandboxmode, where it is possible to play with it without the
danger to insert junk into the database.
I guess, setting RAILS_ENV = 'development' works globally for the whole
server. Is there
the presentation can be found at http://confreaks.net/events/lsrc2010, but
it's not available just yet.
On Fri, Sep 10, 2010 at 7:56 AM, Jeffrey L. Taylor r...@abluz.dyndns.orgwrote:
Quoting BlueHandTalking j...@whidbey.com:
I am looking at getting a new Thinkpad with an i5 processor.
I
I have 3 different type of addresses fot person. I can create and
display them using same views currently (but that might change in the
future) so I created one controller which recognizes which kind of
address you want to deal with now by checking the URL. In a moment
when there is some benefit
Does it matter? AR operations tend to be transactional...
It matters when dealing with concurrency. At the moment, everytime the
queue gets updated as a result of someone moving items around in the
queue or an item being removed from the queue, I use optimisitc
locking to see if the queue has
There is one person who is interested in writing RoR backend for
elFinder http://elrte.org/redmine/boards/1/topics/1054 (page is in
Russian, google translate can handle it).
I'm one of the developers of elFinder, you can ask any questions and I
will be glad to help implement elFinder on RoR.
Btw
You just need to restart terminal and than first make sure you can run
rvm list or any rvm command. and than use this command code rvm --
default ruby-1.8.7 /code
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send
Rick,
The guys at SliceHost.com might have some contacts.
SliceHost was may still be in St. Louis, they got bought a few years
ago.
Van
--
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
Marnen Laibow-Koser wrote:
I don't think you want to do that. I think you want to create a clone
of your *production* environment (call it sandbox or something) with a
separate database, then have a completely separate instance of the
application running with RAILS_ENV set to 'sandbox'.
On 10 September 2010 05:41, Bob Smith bsm...@gmail.com wrote:
I'm trying to get a list of zip codes in my database with
zipstring = sprintf(select distinct zip from visits,households where
+
households.id=visits.household_id and visits.month='%2d' and
visits.year = '%4d' +
and
James Byrne wrote:
Running the cucumber feature that invokes this step generates the
following error:
undefined method `content_type' for nil:NilClass (NoMethodError)
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.0/
lib/active_support/whiny_nil.rb:48:in
At Mon, 6 Sep 2010 04:05:17 +0300,
Svilen Vassilev wrote:
I have similar issues with some js.rjs files after upgrading an app to rails
3. Some respond_to blocks keep working fine as before and I get JS returned,
some keep trying to return HTML and thus spit out the 406 error. I haven't
found
DICOM is the image output of an X-ray machine. X ray plates are
things of past. Radiologists all over the world use DICOM images to
read an X-ray. They have special monitor through which they can view
the DICOM image. But the problem is that we cannot find a server
version of DICOM image viewer
On Sep 9, 2:24 pm, voidstar barryodrisc...@gmail.com wrote:
Hi,
I currently have a large array of model objects (around 5000 this
could grow to be in the 100k range) which have a date attribute. I
want to filter this objects if one of their date attribute falls into
an array of years
On 10 September 2010 15:40, Sandy sandy.as...@gmail.com wrote:
On Sep 10, 7:52 am, radhames brito rbri...@gmail.com wrote:
you have a typo on your model name in controller.
On Fri, Sep 10, 2010 at 4:59 AM, Mauro mrsan...@gmail.com wrote:
I find hard to work with rest and custom actions.
On 10 September 2010 16:13, radhames brito rbri...@gmail.com wrote:
Couldn't find Ruser with ID=logout
My routes.rb has resources :rusers.
the above means your user model has a diferent name than the one you are
usign
I think it is correct.
Model is Ruser, resources :rusers is set by
A Sarkar wrote:
DICOM is the image output of an X-ray machine. X ray plates are
things of past. Radiologists all over the world use DICOM images to
read an X-ray. They have special monitor through which they can view
the DICOM image. But the problem is that we cannot find a server
version of
Msan Msan wrote:
On 10 September 2010 15:40, Sandy sandy.as...@gmail.com wrote:
�session[:user = nil
There appear to be several typos:
�session[:user = nil
�should be:
�session[:user = nil] (missing ])
Or should be session[:user] = nil
Is that the same?
No, Sandy was in error.
Hi, everyone. I wrote a ror app. One of the methods in controller
extracts data from files and saves it to database. Because there are
many new files every night, is it possible to run this method only every
night or every other night? Thanks in advance.
--
Posted via
On 10 September 2010 15:40, Sandy sandy.as...@gmail.com wrote:
My routes.rb has resources :rusers.
Try putting the following line into routes.rb:
map.connect 'user/logout', :controller = 'user', :action = 'logout'
ButI have to set a route for every custom action that I add to
James Byrne wrote:
The response.body inside the step definition contains exactly what I
expect:
h2 class=notice id=authentication_request
To Proceed Please Authenticate Your Identity
/h2
What do I need to change to get this test to work in Rails-3.0.0?
Is there some place
On 9/10/10, radhames brito rbri...@gmail.com wrote:
AR has a sum function.
Hi Radhames,
I am aware of the sum function, but it does not do cumulative sum on
its own. I know how to do it using recursive queries or stored
procedures, but my question is how to deal with that using
will_paginate.
I have determined that this is indeed a webrat problem. Evidently,
webrat overrides assert_select in such a way as to break the Rails-3.0.0
implementation.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
On Sep 10, 11:52 am, Philip Hallstrom phi...@pjkh.com wrote:
On 10 September 2010 05:41, Bob Smith bsm...@gmail.com wrote:
I'm trying to get a list of zip codes in my database with
zipstring = sprintf(select distinct zip from visits,households where
+
households.id=visits.household_id
Hi there,
I've searched far and wide for an answer to this. I am using Rails 3.0.0
with Postgresql8.3 and ActiveRecord. Almost everything works fine - I
have the normal timestamps, which store correctly, and a field called
'time' which is of the type 'time' and this works too.
However, I also
I am a newbie to Rails, coming from a PHP shop, so please excuse my
ignorance.
I have to applications. A Codeigniter PHP app and a Rails 3.0 app. The
rails app makes paypal api calls and the php app makes curl post calls
to the rails app with information from a shopping cart.
How can I make this
Are there any decent backends for rails 3? passenger is disqualified
because of it's unfriendly install. I have a software distribution
system. I don't compile software on production machines.
mongrel2 is disqualified because it won't compile on *BSD, since
it insists on having
On Fri, Sep 10, 2010 at 3:54 PM, Kenneth Dunlap k...@panix.com wrote:
Are there any decent backends for rails 3? passenger is disqualified
because of it's unfriendly install. I have a software distribution
system. I don't compile software on production machines.
mongrel2 is disqualified
On Friday 10 September 2010, Kenneth Dunlap wrote:
Are there any decent backends for rails 3?
Yes: passenger and mongrel are very decent backends.
passenger is
disqualified because of it's unfriendly install. I have a software
distribution system. I don't compile software on production
Quoting Ichiro Saga li...@ruby-forum.com:
Hi, everyone. I wrote a ror app. One of the methods in controller
extracts data from files and saves it to database. Because there are
many new files every night, is it possible to run this method only every
night or every other night? Thanks in
I'm following this tutorial:
http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/
When it comes to running the application, I get the following errors:
-Photo C:/Users/ABDER-~1/AppData/Local/Temp/stream,2396,0.jpg is not
recognized by the 'identify' command.
-Photo
radhames brito wrote:
gem cleanup i think you have an old version of a dependency
I think that you were right.
Thank you.
--
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,
Marnen Laibow-Koser wrote:
There are relatively few cases (not none, but few) where a subquery
should not be replaced by a join. Are you sure you need that subquery?
Marnen: I owe your a debt of gratitude. Your note spurred me to
*really* grok SQL joins. After thirty six hours of study
Hi guys,
I'm a newbie in ruby and I would just like to know how you set a value
for a field in a table where session[:user_id] matches user.user_id.
I am trying to do this from a submit form in the show.html.erb file
because that is where the other field value is set.
Help would be much
Basically when a user uploads content. Or when a user likes a
product or comments on one. These three are interactions. If you are
familiar with Facebook. The homepage displays a sort of user feed.
This is what I am trying to achieve. To have something like this, I
must have a single table. I was
Msan Msan wrote:
On 10 September 2010 15:40, Sandy sandy.as...@gmail.com wrote:
�My routes.rb has �resources :rusers.
�Try putting the following line into routes.rb:
�map.connect 'user/logout', :controller = 'user', :action = 'logout'
ButI have to set a route for every custom action
Adapted from Ryan Bates:
application_controller.rb
def call_rake(task, os, options = {})
options[:rails_env] ||= Rails.env
args = options.map { |n, v| #{n.to_s.upcase}='#{v}' }
system /usr/bin/rake #{task} #{args.join(' ')} --trace 21
#{Rails.root}/log/rake.log if os == 'linux'
system
I've been having problems making threaded comments for the last few
days. Mainly with creating children and displaying the children.
Currently, I have comments shown at the bottom of my articles show view.
The top level comments work, but I do not really know how to implement a
way for users to
I got this error this evening while running my specs: Connection refused -
connect(2)
I'm running under test/development and I'm using SQLite3. I didn't have this
issue yesterday and my code hasn't changed since then. I looked around and
people are saying that it's a DB connection problem
Either that, or (not recommended really) you can enable the catch all route in
routes.rb by uncommenting the line towards the bottom that looks like:
match ':controller(/:action(/:id(.:format)))'
but read the line above that, which tells you that if you do that, you'll
enable access to all
So after an intense day of bug squashing, I am pleased to announce Mail 2.2.6.
Mail 2.2.6 is a bug fix release mainly, all users of the 2.2 series should
definitely update.
Changes include:
* Fixed parsing an email with an empty In-Reply-To header (Reported by Eugene
Pimenov)
* Adding address
81 matches
Mail list logo