[Rails] What is the difference between memcache and memcached and how can it be used in a rail on rails application.

2012-04-14 Thread Gurdipe Dosanjh
Hi All What is the difference between memcache and memcached and how can it be used in a rail on rails application. Kind Regards Gurdipe -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https

Re: [Rails] Rails 2.3 not supported?

2012-04-14 Thread Alex Shulgin
On Sunday, March 4, 2012 7:59:41 PM UTC+2, Walter Lee Davis wrote: > > Maybe 2.3 wasn't affected?? >From the original announcement [https://groups.google.com/d/topic/rubyonrails-security/CdoMUVpsRmQ/discussion]: > Versions Affected: All. > Fixed Versions: 3.2.2, 3.1.4, 3.0.12 > Please note

Re: [Rails] How to implement sory-by links?

2012-04-14 Thread yan shi
i remember that there was a jquery plugin that could do this. 2012/4/14 Colin Law > On 14 April 2012 15:15, Agis A. wrote: > > Hello people. > > > > I have an app which lists Offers from different Vendors. > > > > I want to implement "sort by" links and I'll do this using scopes in my > > Offer

[Rails] Weird problem "uninitialized constant Capistrano"

2012-04-14 Thread LuisRuby
Hi friends! After hours of hard work searching for a solution, I appeal to the community to help me. I'm using Rails 3.2.3, Postgresql, RVM, and running Ubuntu Server 11.10 in my own server machine. The command "cap deploy:check" returns: You appear to have all necessary dependencies installed

[Rails] Re: Problem to deploy with Capistrano

2012-04-14 Thread LuisRuby
Hi friends! Yes, I have enough space on disk and the permissions are OK. I tried to change from "set :deploy_via, :copy" to "set :deploy_via, :remote_cache" and everything seemed to be all right when I got stucked with another problem: bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets a

[Rails] Re: Problem to deploy with Capistrano

2012-04-14 Thread LuisRuby
Em sábado, 14 de abril de 2012 13h53min52s UTC-3, LuisRuby escreveu: > > Hi, friends! > > I'm using Rails 3.2.3, RVM, Postgresql 9.1.3 and running Ubuntu Server > 11.10 on my own Dell server. > I tried this: > > cap deploy:check > * executing `deploy:check' > * executing "test -d /home/digi

[Rails] Re: Problem to deploy with Capistrano

2012-04-14 Thread Juan Pablo Avello
El sábado, 14 de abril de 2012 18:53:52 UTC+2, LuisRuby escribió: > > Hi, friends! > > I'm using Rails 3.2.3, RVM, Postgresql 9.1.3 and running Ubuntu Server > 11.10 on my own Dell server. > I tried this: > > cap deploy:check > * executing `deploy:check' > * executing "test -d /home/digifot

[Rails] Re: syntax error, unexpected tDOT3, expecting $end

2012-04-14 Thread Matt Jones
On Friday, 13 April 2012 16:09:44 UTC-4, Ruby-Forum.com User wrote: > > Hi, > when I run the following code _ get this error > C:\RakeTest>rake > rake aborted! > C:/RakeTest/rakefile.rb:2: syntax error, unexpected tDOT3, expecting > $end > > any help would be greatly appreciated. > Thanks,\Brian

Re: [Rails] Problem to deploy with Capistrano

2012-04-14 Thread Hassan Schroeder
On Sat, Apr 14, 2012 at 9:53 AM, LuisRuby wrote: > Hi, friends! > Well, then I issued:  cap deploy > >    After several minutes I got an error: > >  [188.xx.xx.xx] sftp upload /tmp/20120414150439.tar.gz -> > /tmp/20120414150439.tar.gz > *** upload via sftp failed on 188.xx.xx.xx: Connection timed

[Rails] Problem to deploy with Capistrano

2012-04-14 Thread LuisRuby
Hi, friends! I'm using Rails 3.2.3, RVM, Postgresql 9.1.3 and running Ubuntu Server 11.10 on my own Dell server. I tried this: cap deploy:check * executing `deploy:check' * executing "test -d /home/digifoto.com/apps/digifoto/releases" servers: ["188.xx.xx.xx"] [188.xx.xx.xx] executi

Re: [Rails] Re: undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 15:55, Julian P. wrote: > Colin Law wrote in post #1056501: >> On 14 April 2012 13:17, Julian P. wrote: >>> end >>>  end >>> end >> >> What does the last end match with? >> >> Colin >> > > Damn it that was the mistake. I was always looking at the wrong spot. > Thank you very much

[Rails] Re: undefined method `model_name' for NilClass:Class

2012-04-14 Thread Julian P.
Colin Law wrote in post #1056501: > On 14 April 2012 13:17, Julian P. wrote: >> end >> end >> end > > What does the last end match with? > > Colin > Damn it that was the mistake. I was always looking at the wrong spot. Thank you very much Colin. Julian -- Posted via http://www.ruby-forum.com/

Re: [Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 13:17, Julian P. wrote: > Hi guys, > I just started using Ruby on Rails. After implementing the RoR blog > tutorial I started with my own data model. > Sadly I am not able to get my create page running. > > Model: > class Activity < ActiveRecord::Base > validates :activity,  :pres

[Rails] Re: undefined method `model_name' for NilClass:Class

2012-04-14 Thread Julian P.
new.html.erb New Activity <%= form_for @activity do |f| %> <% if @activity.errors.any? %> <%= pluralize(@activity.errors.count, "error") %> prohibited this activity from being saved: <% @activity.errors.full_messages.each do |msg| %>

Re: [Rails] How to implement sory-by links?

2012-04-14 Thread Colin Law
On 14 April 2012 15:15, Agis A. wrote: > Hello people. > > I have an app which lists Offers from different Vendors. > > I want to implement "sort by" links and I'll do this using scopes in my > Offer model. But how should I implement the functionality in the > controllers/router? Should I use a me

Re: [Rails] Re: undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 14:11, Julian P. wrote: > Colin Law wrote in post #1056490: >> >> I think the problem is that you have just used >> <%= render 'form' %> >> to render the form.  You have not passed the @activity variable to the >> form.  Have a look at the Rails Guide on Layouts and Rendering for

[Rails] How to implement sory-by links?

2012-04-14 Thread Agis A.
Hello people. I have an app which lists Offers from different Vendors. I want to implement "sort by" links and I'll do this using scopes in my Offer model. But how should I implement the functionality in the controllers/router? Should I use a member route along with a new controller action (eg

[Rails] Re: undefined method `model_name' for NilClass:Class

2012-04-14 Thread Julian P.
Colin Law wrote in post #1056490: > > I think the problem is that you have just used > <%= render 'form' %> > to render the form. You have not passed the @activity variable to the > form. Have a look at the Rails Guide on Layouts and Rendering for how > to use :locals to pass variables when rende

Re: [Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 13:17, Julian P. wrote: > Hi guys, > I just started using Ruby on Rails. After implementing the RoR blog > tutorial I started with my own data model. > Sadly I am not able to get my create page running. > > Model: > class Activity < ActiveRecord::Base > validates :activity,  :pres

[Rails] Re: Damn associations

2012-04-14 Thread Juan Pablo Avello
El sábado, 14 de abril de 2012 13:58:56 UTC+2, Ruby-Forum.com User escribió: > > I'm a newbie and have searched many posts and railscast tutorials and > still cant get around this associations thing. > > I have 2 models, a Hotel (created by scaffolding) and Facility. > > The point is to associate

[Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Julian P.
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true valid

[Rails] Re: empty field check.

2012-04-14 Thread Juan Pablo Avello
El sábado, 14 de abril de 2012 14:05:08 UTC+2, Ruby-Forum.com User escribió: > > Juan Pablo Avello wrote in post #1056480: > > El sbado, 14 de abril de 2012 13:12:19 UTC+2, Ruby-Forum.com User > > escribi: > >> class CourseLesson < ActiveRecord::Base > >> CourseDate.where(:date => Date.today, :ca

[Rails] Re: empty field check.

2012-04-14 Thread Dani Dani
Juan Pablo Avello wrote in post #1056480: > El sbado, 14 de abril de 2012 13:12:19 UTC+2, Ruby-Forum.com User > escribi: >> class CourseLesson < ActiveRecord::Base >> CourseDate.where(:date => Date.today, :canceled_time => nil) >> to get my original query working. >> >> Any hints how ? >> >> Thanks

[Rails] Damn associations

2012-04-14 Thread Miguel A.
I'm a newbie and have searched many posts and railscast tutorials and still cant get around this associations thing. I have 2 models, a Hotel (created by scaffolding) and Facility. The point is to associate a facility to a hotel, but since my facility table has all the columns it needs with boole

[Rails] Re: empty field check.

2012-04-14 Thread Juan Pablo Avello
El sábado, 14 de abril de 2012 13:12:19 UTC+2, Ruby-Forum.com User escribió: > > Thank you Juan and Colin. > One thing I didn't mention is that canceled_time comes from different > class where the relationship is: > > class CourseDate < ActiveRecord::Base > has_many :course_lessons > end > > Co

[Rails] Re: empty field check.

2012-04-14 Thread Dani Dani
Thank you Juan and Colin. One thing I didn't mention is that canceled_time comes from different class where the relationship is: class CourseDate < ActiveRecord::Base has_many :course_lessons end CourseLesson class CourseLesson < ActiveRecord::Base belongs_to :course_date end so in the query

[Rails] ajax:success seems not respond.

2012-04-14 Thread Mauro
I have: = form_tag document_template_sessions_path, :id => "document_template_session_frm", :remote => true do In the controller I have: class DocumentTemplateSessionsController < ApplicationController def create session[:document] = Hash.new session[:document][:prot_n]

Re: [Rails] empty field check.

2012-04-14 Thread Colin Law
On 14 April 2012 00:01, Dani Dani wrote: > Hi, > I'm trying to select record as follows: > @course = CourseDate.find_all_by_date_and_canceled_time(Date.today,nil) > > records with todays date but those where the canceled_time is empty, the > above find selects all records for today also those reco

[Rails] Re: empty field check.

2012-04-14 Thread Juan Pablo Avello
El sábado, 14 de abril de 2012 01:01:04 UTC+2, Ruby-Forum.com User escribió: > > Hi, > I'm trying to select record as follows: > @course = CourseDate.find_all_by_date_and_canceled_time(Date.today,nil) > > records with todays date but those where the canceled_time is empty, the > above find selects

[Rails] Passing value from input form

2012-04-14 Thread Soichi Ishida
Rails 3.1.3 I would like to pass the value in an input form to a parameter in function. The value is to be set in <%= text_field_tag :price %> A PayPal official icon initiates the action, 'checkout'. <%= link_to image_tag("https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif";), :action =