Hi
Basically I have a permalink system setup using the to_param method in
the model file. Since I have a system in which categories has_many
tutorials, my URLs look a bit like this:
site.com/CatID-Category-Perma/TutID-Tutorial-Perma
I have a system to redirect when the user puts in an ID to the
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
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 act
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 (whi
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 "re
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 2>&1 >>
#{Rails.root}/log/rake.log &" if os == 'linux'
Msan Msan wrote:
> On 10 September 2010 15:40, Sandy 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
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
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 apprecia
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 stu
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 grou
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 C:/Users/ABDER-~1
Quoting Ichiro Saga :
> 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.
>
Simplest
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
On Fri, Sep 10, 2010 at 3:54 PM, Kenneth Dunlap 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 because it wo
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 sys/sendfile.
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
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 hav
On Sep 10, 11:52 am, Philip Hallstrom wrote:
> > On 10 September 2010 05:41, Bob Smith 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.mo
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: T
On 9/10/10, radhames brito 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 will try to r
James Byrne wrote:
>>
>> The response.body inside the step definition contains exactly what I
>> expect:
>>
>>
>> To Proceed Please Authenticate Your Identity
>>
>>
>> What do I need to change to get this test to work in Rails-3.0.0?
>
> Is there some place that lists the valid synt
On 10 September 2010 15:40, Sandy 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 controller?
--
You rec
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 http://www.ruby-forum.com/
Msan Msan wrote:
> On 10 September 2010 15:40, Sandy 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.
Be
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
> versio
On 10 September 2010 16:13, radhames brito 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 scaffol
On 10 September 2010 15:40, Sandy wrote:
>
>
> On Sep 10, 7:52 am, radhames brito wrote:
>> you have a typo on your model name in controller.
>>
>> On Fri, Sep 10, 2010 at 4:59 AM, Mauro wrote:
>> > I find hard to work with rest and custom actions.
>> > I have an action
>>
>> > def logout
>> >
On Sep 9, 2:24 pm, voidstar 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 selected by the user.
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 th
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
> fo
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
> On 10 September 2010 05:41, Bob Smith 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 visi
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'.
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 rubyonrails-t..
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 rvm --
default ruby-1.8.7
--
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
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
> 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 c
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 of
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 wrote:
> Quoting BlueHandTalking :
> > I am looking at getting a new Thinkpad with an i5 processor.
> >
> > I was curious to what extent this
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 t
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 "Rub
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 wrote:
>
>
> On Sep 10, 7:52 am, radhames brito wrote:
> > you have a typo on your model name i
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
On Sep 10, 7:52 am, radhames brito wrote:
> you have a typo on your model name in controller.
>
> On Fri, Sep 10, 2010 at 4:59 AM, Mauro wrote:
> > I find hard to work with rest and custom actions.
> > I have an action
>
> > def logout
> > session[:user = nil
> > end
>
> > for controller user.
Ah thank you Robert I'd missed that condition in my tests (lazy!)
thanks
On Sep 10, 2:03 pm, Robert Walker wrote:
> Robert Walker wrote:
> > Rails 2.x:
> > :conditions => { timestamp_col_name => year_start...next_year_start }
>
> CORRECTION:
> conditions => { :timestamp_col_name => year_start...n
Frederick Cheung wrote:
> On Sep 9, 5:54�pm, John Chufar 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 putting
> a
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 wrote:
>
>
> On Fri, Sep 10, 2010 at 9:09 AM, radhames brito wrote:
>
>> what i am afraid that will be a problem are plug ins and gem
On Fri, Sep 10, 2010 at 9:09 AM, radhames brito 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 Trapper 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 Trapper wrote:
> radhames brito wrote:
> > anyway what you may be able to do is cha
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/.
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 || me
Quoting BlueHandTalking :
> 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 question :
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 comm
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 http://www.ruby-forum.com
*recaptcha
On Fri, Sep 10, 2010 at 8:02 AM, radhames brito wrote:
> are you using racaptcha?
>
>
> On Fri, Sep 10, 2010 at 6:43 AM, sam 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
>>
are you using racaptcha?
On Fri, Sep 10, 2010 at 6:43 AM, sam 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 one page in
> which al
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
:requirement
you have a typo on your model name in controller.
On Fri, Sep 10, 2010 at 4:59 AM, Mauro wrote:
> 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 => 'logo
AR has a sum function.
On Fri, Sep 10, 2010 at 4:45 AM, Fidel Viegas wrote:
> 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:
>
> ---
anyway what you may be able to do is change the db connection.
On Fri, Sep 10, 2010 at 7:49 AM, radhames brito 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
> webserver.
>
>
> On Fri
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 wrote:
> I would like to give my users an opportunity to switch the application
> into a
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{
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 g
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 be
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 ca
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
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
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:
On 10 September 2010 09:25, Mauro 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
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.
Ho
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 featur
On 10 September 2010 09:25, Mauro 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 gener
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 |balance
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 si
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,
user.presence || ""
see http://rubydoc.info/docs/rails/3.0.0/Object:presence
On Fri, Sep 10, 2010 at 10:25 AM, Mauro 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 %>
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 wrote:
> I'm doing a manual (initial) installation of ruby 1.8.7, rubygems
> 1.3.7 and rails.
> I'm pret
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 r
.
On 9月10日, 上午5时28分, Ruby Rube 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 login form I
> get
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 well.
On Sep 10, 1:30 am, "Jeffrey L. Taylor" wrote:
> Quoting Frederick Cheung :
>
>
>
> > On Sep 9, 2:11 am, "Jeffrey L. Taylor" wrote:
> > > Is it possible to to freeze a single attribute of an ActiveRecord (Rails
> > > 2.3.5). Hopefully in a way that isn't deprecated in 2.3.8 or 3.0.
>
> > attr_
On 10 September 2010 05:41, Bob Smith 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 visits.monthly
83 matches
Mail list logo