[Rails] My partial wont render if there are line breaks (!?)

2011-12-12 Thread comopasta Gr
Hi, I'm having a problem with some partials not rendering if there are line breaks in it. I'm trying Coda editor. Anyone using it? It has given me sometimes strange problems due to text encoding. And now problem with line endings. I guess I won't be trying it for a long time. I imagine not many

[Rails] Re: Credit Card Processing

2011-12-12 Thread comopasta Gr
Muruga wrote in post #1036308: > Hi > Currently I have added a Credit Card Processing Feature to old > rails app.In that app some existing users are there.For new user while > signup they will be charge .But for Existing user again when they sign > in for first time they have to be charged.Late

[Rails] Re: executing javascript on the server side

2011-12-12 Thread comopasta Gr
subbarao wrote in post #1036442: > On Tuesday 13 December 2011 05:16 AM, gerbdla wrote: >> #execute javascript function here >> _gaq.push(['_trackEvent',event_category ,event_label, event_action]) >> >> end >> >> can I do something like this? >> > try this code > > format.js {render :js => "alert('

[Rails] Jruby 1.6 + Rails 3 java servlet session store issue

2011-12-12 Thread Prachi Tripathi
Hi All, I am upgrading from jruby 1.5 to jruby 1.6.3 and rails 2.3.5 to rails 3.0. Earlier i used to use : ActionController::Base.session_store = :java_servlet_store if defined?($servlet_context) in session store located in config/initializers. Now in the same file i do : Mb30::Application.confi

[Rails] Re: executing javascript on the server side

2011-12-12 Thread comopasta Gr
Usha Murali wrote in post #1036452: > Hi, > > Anyone can help me how to give multiple search strings in imap_search > function, > > > i tried with regular expression as follws, since i want to search all > strings in Subject starting with alphabet "s". > > > $emails = imap_search($inbox,"BODY Sp*"

Re: [Rails] executing javascript on the server side

2011-12-12 Thread Usha Murali
Hi, Anyone can help me how to give multiple search strings in imap_search function, i tried with regular expression as follws, since i want to search all strings in Subject starting with alphabet "s". $emails = imap_search($inbox,"BODY Sp*"); Kindly can u suggest any links on this multiple s

Re: [Rails] Re: problem on subtract one year from current year in ruby on rails

2011-12-12 Thread Mukesh Singh
Read this http://guides.rubyonrails.org/active_record_querying.html On Tue, Dec 13, 2011 at 11:03 AM, amvis wrote: > * last_year* = 1.year.ago > > SELECT count(id) from customers where created_at > *"2010-12-13"* > > In the above query i need to change into a variable* last_year instead of > "

[Rails] Re: problem on subtract one year from current year in ruby on rails

2011-12-12 Thread amvis
* last_year* = 1.year.ago SELECT count(id) from customers where created_at > *"2010-12-13"* In the above query i need to change into a variable* last_year instead of "2010-12-13" *. and how to convert this MySQL query into rails query. also give me a link to study the rails queries Thank you v

Re: [Rails] executing javascript on the server side

2011-12-12 Thread subbarao
On Tuesday 13 December 2011 05:16 AM, gerbdla wrote: maybe somebody can help me with this. I need to execute javascript on the server side format.js do render :update do |page| page.insert_html :bottom, content_id, :partial => "add_to_favorite_from_dashboard", :locals => {:object => object

[Rails] select helper in Rails 3

2011-12-12 Thread djangst
Stupid one: anybody have problems with the select helper not selecting an item? There are no integer values for my options (they're all strings), so it's not the usual integer/string conversion problem I've read about. Imagine "Red," "Green," and "Blue." The value in the database is "Green," but i

Re: [Rails] passenger and postgresql in production environment

2011-12-12 Thread gato pardo
>I should remenber that there are no great differences between > development and production section in the database yml file. > > > > # config/database.yml > > development: > > adapter: postgresql > > encoding: unicode > > database: db_album > > pool: 5 > > username: user > > > > A

Re: [Rails] executing javascript on the server side

2011-12-12 Thread Hassan Schroeder
On Mon, Dec 12, 2011 at 3:46 PM, gerbdla wrote: > > maybe somebody can help me with this.  I need to execute javascript on > the server side Why? > format.js do > render :update do |page| >  page.insert_html :bottom, content_id, :partial => > "add_to_favorite_from_dashboard", :locals => {:object

Re: [Rails] executing javascript on the server side

2011-12-12 Thread Jim Ruther Nill
On Tue, Dec 13, 2011 at 7:46 AM, gerbdla wrote: > > maybe somebody can help me with this. I need to execute javascript on > the server side > > > format.js do > render :update do |page| > page.insert_html :bottom, content_id, :partial => > "add_to_favorite_from_dashboard", :locals => {:object =

Re: [Rails] Re: how to use javascript to update markers on Google maps

2011-12-12 Thread Jim Ruther Nill
On Tue, Dec 13, 2011 at 6:08 AM, skrite wrote: > I am doing something similar here. The website is built on rails 2.3.9 > and > uses prototype. > > Almost all of what i need to happen does, but i get to the point where > the update happens and nothing does. > > // add circles to map as it initial

[Rails] executing javascript on the server side

2011-12-12 Thread gerbdla
maybe somebody can help me with this. I need to execute javascript on the server side format.js do render :update do |page| page.insert_html :bottom, content_id, :partial => "add_to_favorite_from_dashboard", :locals => {:object => object, :favorite => favorite, :ftype => content_id}, :layout=

[Rails] Re: ExecJS::RuntimeError in Home#index

2011-12-12 Thread zigomir ziz
This is crime. For this to actually work on Windows (with RailsInstaller) I had to first install node with official msi installer. Then I copied node.exe to folder without whitespaces in its path (than added this path to PATH variable of course) and then I also needed to uninstall node from contro

[Rails] Re: how to use javascript to update markers on Google maps

2011-12-12 Thread skrite
I am doing something similar here. The website is built on rails 2.3.9 and uses prototype. Almost all of what i need to happen does, but i get to the point where the update happens and nothing does. // add circles to map as it initializes addCircles(sites, map, markerArray, lineArray); v

Re: [Rails] Re: finding out where to modify virtual host settings in rails, passenger, apache setup

2011-12-12 Thread Norm Scherer
On 12/10/2011 03:49 PM, John Merlino wrote: I read this article: http://codecolossus.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/ And it says that: "Passenger doesn’t even require virtual hosts to configure themselves as Rails applications. It will automaticall

[Rails] Re: Ubuntu 9.10:: Error: uninitialized constant MysqlCompat::MysqlRes

2011-12-12 Thread Scott Smith
Ginty wrote in post #881997: > Try: > > sudo apt-get install libmysqlclient15-dev > > > > On Jan 20, 4:06 pm, "steve.gooberman-hill" 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, send

Re: [Rails] Make text field accepts only numeric values

2011-12-12 Thread Hector Virgen
I don't know if there's a Rails way (I'm still learning it myself) but if you want to implement this on the client you'll need JavaScript. Or, you can use the HTML5 input type "number", but that's not guaranteed to work on all browsers. http://www.html5tutorial.info/html5-number.php -- *Hector Vi

[Rails] Make text field accepts only numeric values

2011-12-12 Thread Angelo Cordova
Hello people I need your help again. What I want to do is make a text field accepts only numeric values... Thant's means if I press a letter or a simbol the text field should not be filled, it should be just if I press a number. Is there a rails way (rails 3.0.9) to achieve this issue? Thanks

[Rails] Re: Set Ruby Version in Rails Application

2011-12-12 Thread Tim
Sorry, I didn't mean to ask the same question again...when I clicked the link in my email it said it was gone and I couldn't find it. Sorry! And thanks for your answer! You are the best! On Dec 11, 2:56 am, Colin Law wrote: > On 10 December 2011 23:43, Peter Vandenabeele wrote: > > > On Sun, D

[Rails] Re: URL helpers not working in test

2011-12-12 Thread IAmNan
Thanks, Frederick. You're always here to answer questions and I appreciate that, as I'm sure are others. Your comment pointed me in the right direction. It was a race condition between clearing out the old token and creating the new one. So sometimes I'd get nil and other times a valid value. The m

Re: [Rails] problema has_many + accepts_nested_attributes_for

2011-12-12 Thread Celestino Ruas
Hi, worked, thanks a lot. Regards On Dec 12, 2011, at 8:31 AM, Frederick Cheung wrote: > > > On Dec 11, 11:38 pm, Sp4wnX wrote: > >> >> ERROR >> ActiveRecord::HasManyThroughAssociationNotFoundError in >> EscortController#create >> >> Could not find the association :optionanswers in mo

Re: [Rails] passenger and postgresql in production environment

2011-12-12 Thread Craig White
On Dec 12, 2011, at 12:25 PM, gato pardo wrote: > > > On Sun, Dec 11, 2011 at 11:27 PM, Craig White wrote: > On Sun, 2011-12-11 at 19:59 -0400, gato pardo wrote: > > Hi everyone: > > > The application works > > fine as long as It is tried in development environment. > > > > As soon as the p

Re: [Rails] passenger and postgresql in production environment

2011-12-12 Thread gato pardo
On Sun, Dec 11, 2011 at 11:27 PM, Craig White wrote: > On Sun, 2011-12-11 at 19:59 -0400, gato pardo wrote: > > Hi everyone: > > > The application works > > fine as long as It is tried in development environment. > > > > As soon as the production environment is used the following messages > > a

[Rails] Re: anonymous user modeling

2011-12-12 Thread Mr_Tibs
Hey Matt, Thanks for the suggestion. I found it in "The Rails 3 Way" - chapter 9: STI tables. Regards, T On Dec 12, 8:13 am, Matt Jones wrote: > On Dec 11, 2:48 pm, Mr_Tibs wrote: > > > > > > > > > > > Hello, > > > I'm working on my first simple Rails app in which users submit sport > > "tweet

[Rails] Re: Upgrading from rails 1.8 to rails 3

2011-12-12 Thread Frederick Cheung
On Dec 12, 3:42 pm, Chloe Koh wrote: > Hi guys, I need some help with my ruby on rails application. I want to > upgrade it from rails 1.8 to rails 3. Can anyone help me? There is no rails 1.8 (rails went 1.1.x, 1.2.x and then 2.0 IIRC). There is a ruby 1.8 though. Are you trying to upgrade ruby

[Rails] Re: problem on subtract one year from current year in ruby on rails

2011-12-12 Thread Frederick Cheung
On Dec 12, 4:56 pm, amvis wrote: > in my machine i dn't have the local application setup. so just i try this > two for display  that > > *puts last_year = Time.now.ago(1.year)  *or*  last_year = 1.year.ago* > > but it gives error  *undefined method `year' for 1:Fixnum > (NoMethodError).*year is

Re: [Rails] Re: About database modeling.

2011-12-12 Thread Pedro Fernandes Steimbruch
Anyone knows another way to do that cache? I'm thinking to open that system as a SAAS and I don't want to duplicate the book record to each account. -- 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 rub

Re: [Rails] problem on subtract one year from current year in ruby on rails

2011-12-12 Thread amvis
in my machine i dn't have the local application setup. so just i try this two for display that *puts last_year = Time.now.ago(1.year) *or* last_year = 1.year.ago* but it gives error *undefined method `year' for 1:Fixnum (NoMethodError).*year is builtin...? -- You received this message b

[Rails] Upgrading from rails 1.8 to rails 3

2011-12-12 Thread Chloe Koh
Hi guys, I need some help with my ruby on rails application. I want to upgrade it from rails 1.8 to rails 3. Can anyone help me? -- 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@googleg

[Rails] Re: help with temporary database tables

2011-12-12 Thread Frederick Cheung
On Dec 12, 1:57 pm, jsnark wrote: > It's now been a month since I made this post and have not received a > response. > > I am assuming that is because the only way to use temporary database > tables from Ruby is to write raw SQL. or because not every person reads every message. Nosing it aroun

[Rails] Re: Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production

2011-12-12 Thread Erwin
[SOLVED] but don't know why ... I changed:address  => "mail.mydomain.com"to :address  => "localhost" and it's now correctly sending the email... but why the :address  => "mail.mydomain.com" was running fine in the rails console ?? and not when the app is running ? any clue ? erwin

[Rails] Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production

2011-12-12 Thread Erwin
I don't know how to get more info about this issue on my remote server ( Linux/Debian6 - Qmail) localhost testing is fine , so my class UserMailer < ActionMailer::Base is rendering correctly the email ( checked in the development log) now, testing the remote SMTP server , via the production con

[Rails] Re: help with temporary database tables

2011-12-12 Thread jsnark
It's now been a month since I made this post and have not received a response. I am assuming that is because the only way to use temporary database tables from Ruby is to write raw SQL. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Credit Card Processing

2011-12-12 Thread Muruga
Hi Currently I have added a Credit Card Processing Feature to old rails app.In that app some existing users are there.For new user while signup they will be charge .But for Existing user again when they sign in for first time they have to be charged.Later on no need.How to make it happen?.Anybo

Re: [Rails] how to get data from following format #[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"}], :total=>3}>

2011-12-12 Thread Jim Ruther Nill
On Mon, Dec 12, 2011 at 9:04 PM, Pab wrote: > hi, > > i would like to know how to extract value from following format > which is from act as solr > multi search > > StoreProductUpc.multi_solr_search @query,:models => > [SalProduct],:results_format => :ids > > > below is the result came from mu

[Rails] Re: anonymous user modeling

2011-12-12 Thread Matt Jones
On Dec 11, 2:48 pm, Mr_Tibs wrote: > Hello, > > I'm working on my first simple Rails app in which users submit sport > "tweets" (e.g. "tennis, squash") and the server matches them up with > partners. The server will return you a list of SportMatches based on > similar tweets and you have differe

[Rails] how to get data from following format #[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"}], :total=>3}>

2011-12-12 Thread Pab
hi, i would like to know how to extract value from following format which is from act as solr multi search StoreProductUpc.multi_solr_search @query,:models => [SalProduct],:results_format => :ids below is the result came from multisearch how can i get actual id : 16399,16400 and 30504 inste

Re: [Rails] problem on subtract one year from current year in ruby on rails

2011-12-12 Thread Jim Ruther Nill
On Mon, Dec 12, 2011 at 6:42 PM, Michael Pavling wrote: > On 12 December 2011 10:36, amvis wrote: > > For the ruby on rails application. i have to generate last one year > report. > > > > my question is how to subtract one year from current date in ruby, > basically > > the format of date in MyS

Re: [Rails] problem on subtract one year from current year in ruby on rails

2011-12-12 Thread BALA MANI
> can you try like this way > time.to_s I hope it may work bye:) -- 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 from this group, send email to r

[Rails] Re: in acts_as_solr how find data from two table at a time with some conditions

2011-12-12 Thread Pab
could any one provide solution pls? -- 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 from this group, send email to rubyonrails-talk+unsubscr...@googl

[Rails] Re: why can't johnny download?

2011-12-12 Thread Frederick Cheung
On Dec 12, 9:49 am, Ajit Teli wrote: > Im also facing the same problem > > when i click on download a file with data is getting stored in the tmp/ > folder where as in client side it is downloading 1 byte file.(empty > file) > > def exporting_data >       @list = User.find(:all) >       >

Re: [Rails] problem on subtract one year from current year in ruby on rails

2011-12-12 Thread Michael Pavling
On 12 December 2011 10:36, amvis wrote: > For the ruby on rails application. i have to generate last one year report. > > my question is how to subtract one year from current date in ruby, basically > the format of date in MySql is -MM-DD. so how to subtract one year from > this. > > i tried o

[Rails] problem on subtract one year from current year in ruby on rails

2011-12-12 Thread amvis
For the ruby on rails application. i have to generate last one year report. so i think just do like this. Take the current system data, then subtract one year, den select data from MySQL with this new date. *my question is how to subtract one year from current date in ruby, basically the fo

[Rails] Re: why can't johnny download?

2011-12-12 Thread Ajit Teli
Im also facing the same problem when i click on download a file with data is getting stored in the tmp/ folder where as in client side it is downloading 1 byte file.(empty file) def exporting_data @list = User.find(:all) FasterCSV.open("/home/ajit/Projects/xsampleapps/tmp/expo

[Rails] Re: Implementing notifications in Rails

2011-12-12 Thread Samir Selman
> Is there a built in library to implement notifications in ruby on rails? I > need something similar to Facebook notifications. > > Thanks > Samir > -- 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 rub