[Rails] rake background task can not run

2010-09-03 Thread boblu
I want to use rake background task in rails like this system("cd #{Rails.root} && RAILS_ENV=#{Rails.env} rake abc:def -- trace 2>&1 >> #{Rails.root}/log/rake.log &") This is ok in development environment, but will not work in production mode. I used logger to check whether the command string is

[Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Ar Chron
Rails Surfer wrote: >> Sorry, but what is rvm? rvm is a god-send. It lets you maintain multiple ruby installs and switch amongst them on command (among other things, like installed gem sets), and you should definitely employ it. I found this link enormously helpful (mainly because I use Ubuntu

[Rails] Re: Using ActiveRecord Find with associations

2010-09-03 Thread Ar Chron
Pito Salas wrote: > Here's an example: > > class LineItem < ActiveRecord::Base > belongs_to :order > end > > class Order < ActiveRecord::Base > has_many :line_items > end > > my_line_item = LineItem.find(:zipcode => "12345") > > Order.find_by_line_item(my_line_item) # doesn't work > > Orde

[Rails] Re: ruby on rails wiki off?

2010-09-03 Thread Dano
Also I found these: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d07a127a917e6ed/9d89b95e14beb11f http://groups.google.com/group/rubyonrails-wiki/browse_thread/thread/fc88ddafd62a252d So it seems like there is no one who maintains it now On 9월1일, 오전1시31분, Luciano Sous

[Rails] Re: ruby on rails wiki off?

2010-09-03 Thread Dano
I am in the same boat. I raised the same question a week ago but got no reply. thanks, On 9월1일, 오전1시31분, Luciano Sousa wrote: > whats the problem in website to ruby on rails wiki? > i cant access for a long time. > > thanks. > > -- > att: Luciano Sousahttp://www.lucianosousa.net >

[Rails] Using ActiveRecord Find with associations

2010-09-03 Thread Pito Salas
Here's an example: class LineItem < ActiveRecord::Base belongs_to :order end class Order < ActiveRecord::Base has_many :line_items end my_line_item = LineItem.find(:zipcode => "12345") Order.find_by_line_item(my_line_item) # doesn't work Order.find_by_line_item_id (my_line_item) # does wor

[Rails] Triggering Javascript from a Ruby form

2010-09-03 Thread A. Leek
Hello again, I've managed to hack together an uploader, but I need a progress bar to go with it. I ended up using FTP to upload, and got a way to find the progress while it's uploading. I split that off into another function in the controller, which is all well and good. The problem is that I ne

[Rails] Re: Action Controller Error: undefined local variable or method `current_user'

2010-09-03 Thread nobosh
Ok figured it out, the sessions_helper.rb needs to look like this: module SessionsHelper def sign_in(user) cookies.permanent.signed[:remember_token] = [user.id, user.salt] current_user = user end def current_user=(user) @current_user = user

[Rails] Re: memcache in prod vs dev

2010-09-03 Thread badnaam
I understand how to turn caching on or off. Well let me explain. let's say if I am using memcache and I have a post listing page that uses the following method. Now If I want to not use caching in development I will have to write this method without the CACHE.fetch? So basically, I am doing a if/e

Re: [Rails] Re: rails 2 or ralis 3, which is better for a new project in real life?

2010-09-03 Thread Philip Hallstrom
On Sep 3, 2010, at 3:44 PM, Cuz Ican wrote: > It all depends on what the app is going to do/use.. > > You are definitely right thinking you will have faster more stable > success using rails2. That is not a rails thing but anyone in technology > long enough knows this tradeoff no matter the pl

[Rails] Action Controller Error: undefined local variable or method `current_user'

2010-09-03 Thread nobosh
Newbie learning Rails. I'm currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tutorial... How do you resolve this kind of error. It's saying current_user is not de

[Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Cuz Ican
Haven't used them but I would check them out.. http://magicmodels.rubyforge.org/magic_model_generator/ http://github.com/ahe/reverse_scaffold Also, read this forum to consider some potential messy things. http://www.ruby-forum.com/topic/149050 -- Posted via http://www.ruby-forum.com/. -- You re

[Rails] Re: rails 2 or ralis 3, which is better for a new project in real life?

2010-09-03 Thread Cuz Ican
It all depends on what the app is going to do/use.. You are definitely right thinking you will have faster more stable success using rails2. That is not a rails thing but anyone in technology long enough knows this tradeoff no matter the platform. (java, .net, python, drupal, etc..) The bigger

[Rails] Re: Has_and_belongs_to_many form with check_box

2010-09-03 Thread Cuz Ican
You seen this? http://railscasts.com/episodes/17-habtm-checkboxes http://asciicasts.com/episodes/17-habtm-checkboxes Seems like you would want to use something like: @product.categories.include?(category) except you would be like @user.projects.include?(project) -- Posted via http://www.ruby-fo

[Rails] Re: Rake task rails:upgrade:check is not working on windows. Rai

2010-09-03 Thread Cuz Ican
So your running this? http://github.com/rails/rails_upgrade and after you installed those missing gems running "rake rails:upgrade:check" worked just fine? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Hassan Schroeder
On Fri, Sep 3, 2010 at 2:47 PM, E. Litwin wrote: > Odds are, you will need to tell Rails what the primary key of your > legacy table is, unless it happens to be "id" Absolutely, and odds are the OP will encounter other grief in the form of naming conventions/pluralization yadda yadda. :-) But

[Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread E. Litwin
On Sep 3, 12:14 pm, Hassan Schroeder wrote: > Create a model based on an existing table e.g. "things", as in > >  class Thing < ActiveRecord::Base >  end > Odds are, you will need to tell Rails what the primary key of your legacy table is, unless it happens to be "id" class Thing < ActiveRecord:

Re: [Rails] Issues with Relationships

2010-09-03 Thread Colin Law
On 3 September 2010 01:27, Connor Baskauskas wrote: > You can take a look at the app I'm referring to at: > http://github.com/585connor/QA > > So, I've built this question & answer app... kind of. I can get the > answers to be listed on their respective questions but I cannot figure > out how to g

[Rails] Rake task rails:upgrade:check is not working on windows. Rai

2010-09-03 Thread Krunal Shah
Is there any solution to solve the problem of rake task rails:upgrade:check on windows ? I am getting this error ... Rake task fetching failed with (working directory: C:\projects\testproject) rake aborted! no such file to load -- popen4 C:ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:238

[Rails] modify objectclass - Object class violation/Operations error

2010-09-03 Thread Cuz Ican
Summary: Is there anyway that someone has figured out how to adding/removing objectclasses to already existing entries using net-ldap 0.1.1? Detail: I am adding and deleting all sorts of ldap entries just fine. I can even make new entries with objectclasses, but when I want to remove an existing o

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Hassan Schroeder
On Fri, Sep 3, 2010 at 11:18 AM, PalaniKannan K wrote > Realy Sorry... If my problem was not understandable. I am a new bee... there > is no perfect tutorials available for already existing tables to develop web > interface. In before cases I used cgi and perl. Now I started ruby and RoR. > I fee

Re: [Rails] Record Remote IP Address

2010-09-03 Thread Trevor Langas
I figured it out. def set_current_ip if params[:organization] && params[:host] @getip = Getip.new @getip.organization = params[:organization] @getip.host = params[:host] @getip.dyn_ip = request.env['REMOTE_ADDR']

[Rails] net-ldap-0.1.1 gives invalid filter syntax cuz of parenthesi

2010-09-03 Thread Cuz Ican
Things like this won't work.. they fail with Invalid filter syntax filter = Net::LDAP::Filter.construct("nisnetgrouptriple=(,user,)") If I remove the parenthesis and it works fine. or if you use filter = Net::LDAP::Filter.eq( "nisnetgrouptriple", "(,user,)" ) then that works fine.. but i want to

[Rails] Has_and_belongs_to_many form with check_box

2010-09-03 Thread Greg Ma
Hi, I have 2 models, user and project. When I edit my profile I wan't to check the projects I wan't to follow. So here is my code: <% form_for @user do |f| %> ... <% for project in @projects %> <% fields_for "user[project_attributes][]", project do |project_form| %> <%= proj

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread PalaniKannan K
On 3 September 2010 18:23, Hassan Schroeder wrote: > On Fri, Sep 3, 2010 at 8:59 AM, PalaniKannan K > wrote: > > > I feel that, this is same kind of results I got in google search... > Creating > > model using dumped schemas of existing table. but, its not working. > > "its not working" isn't par

[Rails] yield, helpers with blocks, and double-output

2010-09-03 Thread Avram Dorfman
Hello, I'm having a hard time understanding how you are supposed to write helpers that take blocks now in Rails 3. According to 7.4.2 here: http://edgeguides.rubyonrails.org/3_0_release_notes.html you are supposed to write your helpers to return their result as text, rather than append to th

[Rails] invalid byte sequence in UTF-8 , need to re-encode ?

2010-09-03 Thread Erwin
I have a string coming from an email body : (rdb:1) body "\r\nLe 3 sept. 2010 \340 19:06, Event Seve Test a \351crit :\r\n\r\n> Please answer the question by writing an X at the chosen places :\r\n> \r\n> are you coming : \r\n> \r\n> YES: X\r\n> \r\n> NO:_\r\n> \r \n> thanks for you answer\

Re: [Rails] 2.3.5 guide

2010-09-03 Thread Philip Hallstrom
> It seems the guide at http://guides.rubyonrails.org/ has been updated > to 3.0. I am still using 2.3.5 with plans of upgrading. Any ideas on > how I can get the older guide? http://guides.rubyonrails.org/v2.3.8/ -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] 2.3.5 guide

2010-09-03 Thread badnaam
It seems the guide at http://guides.rubyonrails.org/ has been updated to 3.0. I am still using 2.3.5 with plans of upgrading. Any ideas on how I can get the older guide? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to t

[Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Rails Surfer
Carl Jenkins wrote: > Rails Surfer wrote: >> Carl Jenkins wrote: >>> Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails >>> became angry and told me I couldn't (or shouldn't). >>> >>> So, maybe I am missing the blog entry on this subject, but when will >>> Ruby1.9 and Rails 3 p

Re: [Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Felix Schäfer
Am 03.09.2010 um 18:28 schrieb Carl Jenkins: > Sorry, but what is rvm? http://lmgtfy.com/?q=rvm (it was the 3rd hit here, though I'd wager it might be the first in your locale) Felix -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Carl Jenkins
Rails Surfer wrote: > Carl Jenkins wrote: >> Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails >> became angry and told me I couldn't (or shouldn't). >> >> So, maybe I am missing the blog entry on this subject, but when will >> Ruby1.9 and Rails 3 play nice? > > Yeah...But us

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Hassan Schroeder
On Fri, Sep 3, 2010 at 8:59 AM, PalaniKannan K wrote: > I feel that, this is same kind of results I got in google search... Creating > model using dumped schemas of existing table. but, its not working. "its not working" isn't particularly useful information. So you have an existing table, say

[Rails] Re: Google maps -> sending coördinates

2010-09-03 Thread Marnen Laibow-Koser
Rails Surfer wrote: > I need to send geo coördinates from a mysql database to a google maps > javascript. > > There´s no problem to get them into rails...But how can i send them to > javascript ? > > I know javascript is client side so i think it´s impossible to include > ruby variables... > > S

[Rails] Re: Using Rails 3 with Ruby 1.9

2010-09-03 Thread Rails Surfer
Carl Jenkins wrote: > Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails > became angry and told me I couldn't (or shouldn't). > > So, maybe I am missing the blog entry on this subject, but when will > Ruby1.9 and Rails 3 play nice? Yeah...But use 1.9.2 and rvm -- Posted via

[Rails] Google maps -> sending coördinates

2010-09-03 Thread Rails Surfer
I need to send geo coördinates from a mysql database to a google maps javascript. There´s no problem to get them into rails...But how can i send them to javascript ? I know javascript is client side so i think it´s impossible to include ruby variables... Suggestions ? Thanks -- Posted via http

[Rails] Re: Problema con parámetros en collection_s elect (No novato)

2010-09-03 Thread Evaldo Kalbermatter
Evaldo Kalbermatter wrote: > Hola a t...@s, > > Les cuento... Tengo lo siguiente en aplicación: > > Una página donde esta mi modelo docencia que a su vez le voy agregando > todos los dictados de carreras: > > ><% f.fields_for :dictados do |dictado_form| %> ><%= render :partial => 'dic

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread PalaniKannan K
On 3 September 2010 16:21, Richard Henwood wrote: > On Fri, 03 Sep 2010 12:16:26 +0200, PalaniKannan K wrote: > > > Hi, > > > > I am new bee to Rais. I need to create a Rails application with existing > > database with several number of tables. When i came across web, I didn't > > find any fruitf

Re: [Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread PalaniKannan K
On 3 September 2010 16:08, Ar Chron wrote: > Start with googling 'rails legacy database' for ideas. > Yaa... I will use this hint. Thank You. > > Providing only 'read access' simply means your rails application should > not accept any new/create/update requests, and there are numerous ways > to

Re: [Rails] Using Rails 3 with Ruby 1.9

2010-09-03 Thread Hassan Schroeder
On Fri, Sep 3, 2010 at 8:53 AM, Carl Jenkins wrote: > Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails > became angry and told me I couldn't (or shouldn't). > > So, maybe I am missing the blog entry on this subject, but when will > Ruby1.9 and Rails 3 play nice? cf

[Rails] Using Rails 3 with Ruby 1.9

2010-09-03 Thread Carl Jenkins
Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails became angry and told me I couldn't (or shouldn't). So, maybe I am missing the blog entry on this subject, but when will Ruby1.9 and Rails 3 play nice? -- Posted via http://www.ruby-forum.com/. -- You received this message b

[Rails] Problema con parámetros en collection_selec t (No novato)

2010-09-03 Thread Evaldo Kalbermatter
Hola a t...@s, Les cuento... Tengo lo siguiente en aplicación: Una página donde esta mi modelo docencia que a su vez le voy agregando todos los dictados de carreras: <% f.fields_for :dictados do |dictado_form| %> <%= render :partial => 'dictado', :locals => { :f => dictado_form } %>

[Rails] Re: Objects with versions: how to avoid 1 + n queries?

2010-09-03 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: > [...] >>> [outer SELECT and JOIN as above] >>> ORDER BY article.id, version.created_at desc >>> GROUP BY article.id >>> [further JOINs may be necessary in some DBs, but the principle holds] >> >> How does this ensure that I get the latest version? > > Sorry, I meant

[Rails] Re: Objects with versions: how to avoid 1 + n queries?

2010-09-03 Thread Marnen Laibow-Koser
Michael Schuerig wrote: > On Friday 03 September 2010, Marnen Laibow-Koser wrote: >> Then I'm not sure why :joins won't do the trick. > Because :joins, doing a simple inner join on articles and versions, > creates a relation with a row for each version. I want one row, made up > from an article wit

[Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Richard Henwood
On Fri, 03 Sep 2010 12:16:26 +0200, PalaniKannan K wrote: > Hi, > > I am new bee to Rais. I need to create a Rails application with existing > database with several number of tables. When i came across web, I didn't > find any fruitful ideas for developing application using existing > tables. Eve

[Rails] Re: Re: ajax and partials

2010-09-03 Thread Dave Castellano
Edmond Kachale wrote: > Dave, > > I'm sorry, I had to do it the "long" way. I have zipped some sample > code: a > template and an example. *Pastie* could not handle it. I am sending over > to > you. Thank you for taking the time to answer my questions. You sample code was a huge help! Great

[Rails] Re: RoR with Existing tables in database using Postgresql

2010-09-03 Thread Ar Chron
Start with googling 'rails legacy database' for ideas. Providing only 'read access' simply means your rails application should not accept any new/create/update requests, and there are numerous ways to defend against this. -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] RoR with Existing tables in database using Postgresql

2010-09-03 Thread Kannan
Hi, I am new bee to Rais. I need to create a Rails application with existing database with several number of tables. When i came across web, I didn't find any fruitful ideas for developing application using existing tables. Everything i found was to create new database with Create, Edit, Insert fe

[Rails] I have an issue that I can't solve at all

2010-09-03 Thread Дастан Кожомуратов
Hello I have a problem, I want to switch my merb project to Rails3. Can you help to deal with it? -- 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...@googlegroups.com. To unsubscribe fro

[Rails] RoR with Existing tables in database using Postgresql

2010-09-03 Thread PalaniKannan K
Hi, I am new bee to Rais. I need to create a Rails application with existing database with several number of tables. When i came across web, I didn't find any fruitful ideas for developing application using existing tables. Everything i found was to create new database with Create, Edit, Insert fe

[Rails] rails 2 or ralis 3, which is better for a new project in real life?

2010-09-03 Thread 侯健
Hi, Our team decided to use rails to develop our new web application project. Some of our team members think we should ues rails 3 for our new application, beacuse they have many great new features. But the others doesn't agree with that, they said: "There has been many applications based on rail

[Rails] Re: ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value.

2010-09-03 Thread Frederick Cheung
On Sep 2, 9:21 pm, powertoaster wrote: > > If  value is contained in TRUE_VALUES then it returns true(TrueClass). > But if value is anything else it returns nil(NilClass) instead of > false(FalseClass) > > This does not seem consistent or expected to me since false <> nil. > > Since we have TRUE_V

[Rails] nested form + partial + collection_select [No novato]

2010-09-03 Thread Evaldo Kalbermatter
¡Hola! Tengo lo siguiente: Una página donde esta mi modelo docencia que a su vez le voy agregando todos los dictados de carreras: <% f.fields_for :dictados do |dictado_form| %> <%= render :partial => 'dictado', :locals => { :f => dictado_form } %> <% end %> <%= add_child_link "Agre

[Rails] Re: Rack gem in not getting unpacked

2010-09-03 Thread Saurabh Peshkar
Saurabh Peshkar wrote: > Hi All, > > my server is having rack gems as: > > rack (1.2.1, 1.1.0, 1.0.1, 1.0.0) > > when i run the following command in my project/vendor/gems folder: > > gem unpack rack-1.0.0 > > It shows the following error message: > > Error: Gem 'rack-1.0.0' not installed. >

[Rails] Re: upgrading to rails 3.

2010-09-03 Thread Tony Primerano
try adding trace to your rake command to get more information rake rails:upgrade:check --trace On Sep 3, 5:32 am, Mauro wrote: > I've installed rails_upgrade plugin with ruby script/plugin > installhttp://github.com/rails/rails_upgrade.git. > Then if I run rake rails:upgrade:check it says > rak

[Rails] Re: upgrading to rails 3.

2010-09-03 Thread Robert Walker
Msan Msan wrote: > I've installed rails_upgrade plugin with ruby script/plugin install > http://github.com/rails/rails_upgrade.git. > Then if I run rake rails:upgrade:check it says > rake aborted! > no such file to load -- initializer > > What I've missed? I just went through running rails_upgrad

[Rails] Re: Using Factory Girl with has many relationship

2010-09-03 Thread Tony Primerano
Try this Factory.define :article do |f| f.title "Hello, world" f.comments {|comments| [comments.association(::comment)]} end Factory.define :comment do |f| f.content "Awesome!" end On Sep 3, 6:07 am, Satsou Sa wrote: > Hello, > > I have this kind of relation: > >   class Arti

[Rails] Rack gem in not getting unpacked

2010-09-03 Thread Saurabh Peshkar
Hi All, my server is having rack gems as: rack (1.2.1, 1.1.0, 1.0.1, 1.0.0) when i run the following command in my project/vendor/gems folder: gem unpack rack-1.0.0 It shows the following error message: Error: Gem 'rack-1.0.0' not installed. Any idea on this?? Thanks, Saurabh -- Posted vi

Re: [Rails] Using Factory Girl with has many relationship

2010-09-03 Thread Rick R
On Fri, Sep 3, 2010 at 8:38 AM, Rick R wrote: > On Fri, Sep 3, 2010 at 6:07 AM, Satsou Sa wrote: > >> I had tried to write those factories: >> >>  Factory.define :article do |f| >>    f.title "Hello, world" >>  end >> >>  Factory.define :comment do |f| >>    f.content "Awesome!" >>    f.associati

Re: [Rails] Using Factory Girl with has many relationship

2010-09-03 Thread Rick R
On Fri, Sep 3, 2010 at 6:07 AM, Satsou Sa wrote: > I had tried to write those factories: > >  Factory.define :article do |f| >    f.title "Hello, world" >  end > >  Factory.define :comment do |f| >    f.content "Awesome!" >    f.association :article > end I'm still pretty newb, so I could be wa

[Rails] Pass selected value in combo as a parameter

2010-09-03 Thread Alfredo Bonilla
Hi, I have a select in my form: <%= select @issue_type, "name", @issue_types.collect {|p| [p.name, p.id]} %> What I need to do is execute a method passing the value selected in the combo. I've tried lot of things, but I couldn't. @issue_type is created in the controller and I assigned the first

[Rails] Using Factory Girl with has many relationship

2010-09-03 Thread Satsou Sa
Hello, I have this kind of relation: class Article < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :article attr_protected :article_id end The default scenario inside controllers looks like: @article = Article.create(:title => "fo

[Rails] upgrading to rails 3.

2010-09-03 Thread Mauro
I've installed rails_upgrade plugin with ruby script/plugin install http://github.com/rails/rails_upgrade.git. Then if I run rake rails:upgrade:check it says rake aborted! no such file to load -- initializer What I've missed? -- You received this message because you are subscribed to the Google

[Rails] Re: Error No such file or directory

2010-09-03 Thread Frederick Cheung
On Sep 2, 4:22 pm, Pedro wrote: > Hi, > > I have a website deployed on heroku, but my local git repository was > ereased, so I m trying to create a new local repository pulling my > deployed site. I run : git clone -o heroku g...@heroku.com:my_app.git, > but now when I run script/server I get th

[Rails] Error No such file or directory

2010-09-03 Thread Pedro
Hi, I have a website deployed on heroku, but my local git repository was ereased, so I m trying to create a new local repository pulling my deployed site. I run : git clone -o heroku g...@heroku.com:my_app.git, but now when I run script/server I get this error msg: pe...@ubuntu:~/proj/my_app$ scr

[Rails] ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value.

2010-09-03 Thread powertoaster
value_to_boolean(value), does not always return a boolean value, only when true. 150: def value_to_boolean(value) 151: if value.is_a?(String) && value.blank? 152: nil 153: else 154: TRUE_VALUES.include?(value) 155: end 156: end

[Rails] Record Remote IP Address

2010-09-03 Thread tlangas
I've seen several examples online about people wanting to record the visitors remote IP Address for their own reasons. In my case I want to record the IP address from a remote computer that uses a dynamic IP address. I need this information saved without user interaction. Right now I have a simple

[Rails] YUI, Hpricot and security

2010-09-03 Thread Martin Hawkins
I'm creating a site that involves a blog, using Rails 2.3.8. I've used the YUI Rich Text Editor to allow posts to be created (the blog is for a photo site so images have to be uploaded) and the SimpleEditor for posting comments. In both cases, I'm using Hpricot to parse the html for index and show

[Rails] Re: Objects with versions: how to avoid 1 + n queries?

2010-09-03 Thread Michael Schuerig
On Friday 03 September 2010, Marnen Laibow-Koser wrote: > Michael Schuerig wrote: > > On Friday 03 September 2010, Marnen Laibow-Koser wrote: > >> On further reflection, I don't know why you would need an outer > >> join unless not every Article has a Version associated. Is that > >> the case? > >