Re: [Rails] Recording remote_ip that created a record in a nested form

2011-03-31 Thread Chris Kottom
When a user creates a new record, it should be through a request with the nested form which is then handled by a controller somewhere in your application where you will have access to the client's IP. You would then need to store that IP address as part of your model for later retrieval / display.

Re: [Rails] integrate facebook

2011-03-31 Thread Narendra sisodiya
ok looks like rubyforge.org is down. you can check facebooker on gihub : https://github.com/mmangino/facebooker On Fri, Apr 1, 2011 at 11:37 AM, uday kiran wrote: > link are not opening.please give me some more details. > > > On 1 April 2011 11:34, Narendra sisodiya wrote: > >> look at followi

[Rails] integrate facebook

2011-03-31 Thread Magesh S
@kiran: for integrating facebook, i tried facebooker which is outdated, not suitable if you are using rails 3. i'm using fbgraph right now, you can download a sample app from --> https://github.com/nsanta/fbgraph_example and see how it works. you might also wanna look at another gem -> koala

Re: [Rails] integrate facebook

2011-03-31 Thread rajeevsharma86
search on google rfacebook , facebooker , mogile And also look at github too That would be more help-full On Fri, Apr 1, 2011 at 11:37 AM, uday kiran wrote: > link are not opening.please give me some more details. > > > On 1 April 2011 11:34, Narendra sisodiya wrote: > >> look at following plug

[Rails] Netsuite data fetch

2011-03-31 Thread Abhishek shukla
Hello Friends, I have a requirement where I need to fetch netsuite Inventory Items, for the same I am using "netsuite_client" gem but somehow I can only fetch a single record via "client.find_by('ItemSearchBasic', " method is there any way I can fetch all the inventory items.. Thanks for any help

Re: [Rails] integrate facebook

2011-03-31 Thread uday kiran
link are not opening.please give me some more details. On 1 April 2011 11:34, Narendra sisodiya wrote: > look at following plug-ins/gem > > Rfacebook http://rfacebook.rubyforge.org/ > Facebooker > http://facebooker.rubyforge.org/ > > > On Fri, Apr 1, 2011 at 11:3

Re: [Rails] integrate facebook

2011-03-31 Thread Narendra sisodiya
look at following plug-ins/gem Rfacebook http://rfacebook.rubyforge.org/ Facebooker http://facebooker.rubyforge.org/ On Fri, Apr 1, 2011 at 11:30 AM, uday kiran wrote: > > > can u tell me how to integrate facebook in ruby on rails application > > > please give

[Rails] integrate facebook

2011-03-31 Thread uday kiran
can u tell me how to integrate facebook in ruby on rails application please give me help -- 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 g

Re: [Rails] Re: ActiveRecord: when exactly is a record (model) saved to the database?

2011-03-31 Thread Michael Pavling
On 1 April 2011 01:22, Bryan Crossland wrote: > Someone else might know more as to why "save" returns true in this case. If > not, then it is most likely a bug. Try it in your SQL console of choice: UPDATE my_table SET field1 = 'new value' WHERE id = You'll get a message "no records were upd

Re: [Rails] How to work with data from DB in controller

2011-03-31 Thread Michael Pavling
On 1 April 2011 00:00, Manny 777 wrote: > But obviously I'm getting error message about undefined local variable > sequence. Are you sure you're not getting "undefined local variable save_seq"? Did you cut/paste the code here, or did you re-type it (so is it *exactly* what's in your controller, o

[Rails] Re: print for page

2011-03-31 Thread Mallikarjun rao
I referring to actually sending the page to the printer. can you please send the process of that/. On Tue, Mar 29, 2011 at 5:50 PM, Tim Shaffer wrote: > Are you referring to actually sending the page to the printer, or > generating a "printer friendly page"? > > The answer is different dependin

[Rails] Re: How to secure paypal signature, username and password stored in app_config

2011-03-31 Thread Tom Mac
Hi I am using app_config.yml exactly like http://railscasts.com/episodes/143-paypal-security Please help Thanks -- 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,

[Rails] require files

2011-03-31 Thread Alex Katebi
How to I handle loading files with relative path? For example: require '../spec_helper.rb' require '/home/user/myapp/spec/spec_helper.rb' Thanks! Alex -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send em

Re: [Rails] Re: ActiveRecord: when exactly is a record (model) saved to the database?

2011-03-31 Thread Bryan Crossland
On Thu, Mar 31, 2011 at 9:06 AM, Alexey Muranov wrote: > I am posting a related question in the same thread. > It is more of a philosophical question. > Can anybody please give me some philosophical explanation why the > following behavior of ActiveRecord is considered ok (or should i submit > a b

[Rails] Route with optional segments

2011-03-31 Thread Perry Smith
In Rails 2.3.5, is this the proper way to do this? map.calls "calls/:group/:view/:subselect", :controller => 'calls', :action => 'index' map.calls "calls/:group/:view",:controller => 'calls', :action => 'index' map.calls "calls/:group", :controller => 'calls', :a

Re: [Rails] Form method="post/get" and routes

2011-03-31 Thread Bryan Crossland
On Thu, Mar 31, 2011 at 4:13 AM, Manny 777 wrote: > Hello there, > I'm doing a form and I want to send this form with method="post". Head > of form looks so: > > <%= form_tag({ :controller => 'admin', :action => 'menu_add' }, { > :method => 'post' }) do %> > > And in controller I have this: > >

[Rails] How to work with data from DB in controller

2011-03-31 Thread Manny 777
Hi there, I have the collection with items "name", "surname", "sequence". When I'm saving next user to my collection, I need to get the highest value of "sequence" in my collection, this value increment and save to new user... but I don't know, how to get the highest value stored in collection...

[Rails] Recording remote_ip that created a record in a nested form

2011-03-31 Thread baldmark
My application creates new records in a nested form. I want to record the ip address that created the record (assuming it was created from the controller in this way). How can I do this, given that request.remote_ip is not accessible in the model? Mark -- You received this message because you

Re: [Rails] link_to with hidden parameters

2011-03-31 Thread Chris Mear
On 31 March 2011 14:31, paulo wrote: > Sorry if this has been asked before, I'm just looking for a pointer on > the 'standard' or accepted way to get around this issue, as oppose to > some 'bodges' that would seem workable. > > Dead simple: > > I have an index page for model 'properties' which nee

[Rails] Re: Ruby on Rails for Tablet Computers (Android OS)

2011-03-31 Thread cipher_neo
I've not heard of Mirah. Certainly like the idea though. I have decided to drop the whole rails approach. I had designed a rails app to act as a full point of sale application. It would be accessed over tablet pc browsers. I have done some testing today accessing the web app via safari on the ip

Re: [Rails] multiple vhosts running off of one passenger/rails app

2011-03-31 Thread Paul
I just create two separate folders but have them point to the same svn repository. Then I have a file called skin.yml (not checked in) that contains any data that differentiates them. So the files are duplicated, but they are always in sync because I deploy both sites in parallel. On Thu, Mar 31,

[Rails] Google Charts API use

2011-03-31 Thread CiriusMex
Hello, I'm testing Google Charts API plugin for rails and have a few questions about it's use (I searched for a developper documentation for about an hour without founding anything really interesting): Here is my test code: # Testing google charts api chart = GoogleChart.new chart.type = :bar_vert

Re: [Rails] can i switch to rails 2.3.5 and run a rails 2.3.5 code??

2011-03-31 Thread Rob Biedenharn
You should look at the gemsets feature of rvm. Then you can use the .rvmrc file in each project to select a gemset (and a ruby interpreter). After you've done this, each project will see just its own gems. You can use bundler to manage the gems locally, too, which makes it quite painless

[Rails] Re: Test errors in fuctional test after adding before_filter :login_required to controller

2011-03-31 Thread Andre Schütz
I found a solution that uses fixtures and executes the tests without any errors. I wrote a short article at: http://www.faustas.de/rails-test-error-beforefilter-loginrequired-controller -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goo

[Rails] Re: can i switch to rails 2.3.5 and run a rails 2.3.5 code??

2011-03-31 Thread Rajesh B.
Thanks Jeffrey L. Taylor -- 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, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to ru

[Rails] Job: Software Engineering Director - Union Square, New York City

2011-03-31 Thread Victor Milin
Knewton is looking for a talented Software Engineering Director with superior leadership, problem solving and coding skills. We have a team of extremely smart, talented and (ahem) opinionated engineers. We need someone who is going to know when to steer and guide our engineers and know when to get

[Rails] Job: Software Engineers - Union Square, New York City

2011-03-31 Thread Victor Milin
Knewton is looking for talented Software Engineers with superior problem solving and coding skills. Based in NYC's Union Square, Knewton is poised to revolutionize the practice of education with the world’s most powerful adaptive learning engine. We are a startup rich in eclectic personalities, are

Re: [Rails] multiple vhosts running off of one passenger/rails app

2011-03-31 Thread Norm Scherer
On 03/31/2011 10:17 AM, Walther Diechmann wrote: Hi, I've been googling quite a bit - but up until now to no use :( My problem is how to configure Apache conf (and perhaps Passenger) for this setup to work: ServerName oxen.company_A.com DocumentRoot /var/www/html/oxen/sites/company_

Re: [Rails] can i switch to rails 2.3.5 and run a rails 2.3.5 code??

2011-03-31 Thread Jeffrey L. Taylor
Quoting Rajesh B. : > Hi all, > > i have installed rails 3 using RVM . the prob is now i have two parallel > projects where one is in 2.3.5 and another is in rails3. > [snip] Look in config/environment.rb for a line like this, or add it if necessary: # Specifies gem version of Rails to use whe

[Rails] can i switch to rails 2.3.5 and run a rails 2.3.5 code??

2011-03-31 Thread Rajesh B.
Hi all, i have installed rails 3 using RVM . the prob is now i have two parallel projects where one is in 2.3.5 and another is in rails3. i use Mac o x 10.6.3 mysql :Server version: 5.1.56 MySQL so can i switch in between rails3 and rails 2.3.8?? this is my gem list... actionmailer (3.0.5, 3.0

[Rails] multiple vhosts running off of one passenger/rails app

2011-03-31 Thread Walther Diechmann
Hi, I've been googling quite a bit - but up until now to no use :( My problem is how to configure Apache conf (and perhaps Passenger) for this setup to work: ServerName oxen.company_A.com DocumentRoot /var/www/html/oxen/sites/company_A/public PassengerAppRoot /var/www/html/oxen

Re: [Rails] Communication between two apps?

2011-03-31 Thread Andrew Porter
On 30/03/11 15:10, Heinz Strunk wrote: I have two different Rails apps and I would like t o sync the user databases. What's the best way to do that? I thought of whenever someone registers with one app the user information is posted to the other app and vice versa. What would you use for that? JS

Re: [Rails] Re: Re: Parse selectbox value with javascript

2011-03-31 Thread Colin Law
On 31 March 2011 16:17, Tobias H. wrote: > Hey guys, > > I tried the following (in a RJS-Template), but it doesn't work: > > page[:ma].select('select#makro_ma_attributes__algorithm_id').each do > |sa| >  puts sa.getValue > end > > > => i want to loop over all selectboxes and read out the value wit

[Rails] Re: Re: Parse selectbox value with javascript

2011-03-31 Thread Tobias H.
Hey guys, I tried the following (in a RJS-Template), but it doesn't work: page[:ma].select('select#makro_ma_attributes__algorithm_id').each do |sa| puts sa.getValue end => i want to loop over all selectboxes and read out the value with RJS => "ma" is a div tag which contains many other div

[Rails] Re: Communication between two apps?

2011-03-31 Thread pepe
On Mar 30, 10:10 am, Heinz Strunk wrote: > Hey folks, > > I have two different Rails apps and I would like t o sync the user > databases. What's the best way to do that? I thought of whenever someone > registers with one app the user information is posted to the other app > and vice versa. What wo

Re: [Rails] link_to with hidden parameters

2011-03-31 Thread radhames brito
> > > I know that I could do a javascript function or create a hidden form > but was wondering if there is a more elegant way to solve this, as it > must crop up all of the time. > > taking those 2 out , and the uri, how will the server know what you want? you can map is to the uri so you dont use

Re: [Rails] Is there a way to ignore DST?

2011-03-31 Thread Colin Law
On 30 March 2011 20:06, Coderama wrote: > I want to save my datetime and display it using a user's TimeZone > ignoring DST at all times. Is this possible? Do you know what the user's timezone is? If so then take the timezone offset (which is distinct from the DST setting) and calculate the time

[Rails] Re: ActiveRecord: when exactly is a record (model) saved to the database?

2011-03-31 Thread Alexey Muranov
I am posting a related question in the same thread. It is more of a philosophical question. Can anybody please give me some philosophical explanation why the following behavior of ActiveRecord is considered ok (or should i submit a bug report/feature request?): In console: > p = Person.create(:n

[Rails] Re: Is there a way to ignore DST?

2011-03-31 Thread t.pickett66
On Mar 30, 2:06 pm, Coderama wrote: > I want to save my datetime and display it using a user's TimeZone > ignoring DST at all times. Is this possible? Rather than storing a timezone string you could just store the offset, so since I'm in "Central Time US & Canada" I would just use "-0600" which w

Re: [Rails] Re: Parse selectbox value with javascript

2011-03-31 Thread Walter Lee Davis
If you have multiple elements on your page that have the literal value name="algo" then the last one will "win" and only that one value will be submitted to the server by the browser. If they are actually name="algo[]", then you will receive an array of values for algo and you can iterate o

[Rails] link_to with hidden parameters

2011-03-31 Thread paulo
Hi All, Sorry if this has been asked before, I'm just looking for a pointer on the 'standard' or accepted way to get around this issue, as oppose to some 'bodges' that would seem workable. Dead simple: I have an index page for model 'properties' which needs a per-property link to create a new 'l

[Rails] Re: Is there a way to ignore DST?

2011-03-31 Thread jmanpa
See if TimeZone.period_for_local works for you. It has a DST=false parameter. -- 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

[Rails] Re: Ruby on Rails for Tablet Computers (Android OS)

2011-03-31 Thread dsadaka
As opposed to running the server on the handheld, have you looked at writing an app using Mirah? It's very, very ruby-like. Mirah is a simpler Java, a Java that is fun to work with. Best of all, it is also already fully functional, and is just a simple gem install away: -- http://www.igvita.com/2

[Rails] Affordable developer with good software design skills?

2011-03-31 Thread Peter Bell
Hi All, Apologies if this is verging on O/T for the list, but I do see some job ads and I've been trying to contribute substantively to the list for the last couple of months. I'm in the horrible position of having too much work, but some of it isn't that profitable so I can't go to my regular

[Rails] Re: Rails 3 respond_with csv

2011-03-31 Thread mfilej
Did you have any luck with this, Oliver? I've encountered exactly the same problem. Should we reported this as a bug? On Mar 7, 12:08 pm, olivernn wrote: > I appreciate the discussion on the pros and cons of exporting to csv, > however my question was more to do with what the expected behaviour

Re: [Rails] Parse selectbox value with javascript

2011-03-31 Thread Walter Lee Davis
On Mar 31, 2011, at 7:10 AM, Tobias H. wrote: Hey guys, i've the following question: how can i parse the value of a selectbox within a div-tag (with the id "ma") via AJAX and use the parsed value for reading out some data from my database. the parsing request should be started by selecting a

[Rails] Re: Parse selectbox value with javascript

2011-03-31 Thread Tobias H.
Thanks for the fast request. Do you also know how it's possible to read all values of different selectboxes in different div-tags (but all with the same name "algo") with prototype: Is there a way to loop over all those div-tags and read the value of the selectbox in each div-tag? -- Posted v

[Rails] Re: 2 records getting inserted in two different tables using one database call

2011-03-31 Thread Matias Fierro
Its not clear what you need or why you can't just call two different inserts. But maybe a callback as after_create will help you. class User after_create :create_blog def create_blog Blog.create(:title => self.name) end end On Mar 30, 4:48 pm, Payal Patel wrote: > how would you execute 2 inse

Re: [Rails] Re: Where do I put code when I share a partial between two controllers

2011-03-31 Thread Walter Lee Davis
I think this is just basic to how Rails works. The controller responds to requests with methods. Those methods may be further decomposed into other methods and variable values, but your statement is true as far as I understand it. Walter On Mar 31, 2011, at 6:50 AM, Albert Català wrote: -

[Rails] Parse selectbox value with javascript

2011-03-31 Thread Tobias H.
Hey guys, i've the following question: how can i parse the value of a selectbox within a div-tag (with the id "ma") via AJAX and use the parsed value for reading out some data from my database. the parsing request should be started by selecting another selectbox. My mainquestion is: how can i par

[Rails] How to secure paypal signature, username and password stored in app_config

2011-03-31 Thread Tom Mac
Hi I store paypal api username, password and signature as simple text in config/app_config.yml. I would like to know whether this can be protected , than just storing it as text which anybody can read from app_config.yml. Thanks Tom -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: Where do I put code when I share a partial between two controllers

2011-03-31 Thread Albert Català
Thanks for your response, sorry but my unknows go far away: I have two entitys: 1- Views or Partial: and I undersant this: render :partial /shred/foo 2- Method/controller (X). now I place this method in application_controller and the .js.rjs in views/application/X.js.rjs. It works But I do th

[Rails] Dextra oferece curso gratuito de Ruby On Rails em Abril

2011-03-31 Thread Dextra Sistemas
Evento organizado pela Dextra Sistemas será quinta-feira (14/04/2011) A Dextra oferecerá um minicurso GRATUITO sobre programação Ruby on Rails em São Paulo. O curso colocará o participante em contato com os fundamentos de Ruby on Rails, uma das mais promissoras tecnologias para projetos web e que,

[Rails] Form method="post/get" and routes

2011-03-31 Thread Manny 777
Hello there, I'm doing a form and I want to send this form with method="post". Head of form looks so: <%= form_tag({ :controller => 'admin', :action => 'menu_add' }, { :method => 'post' }) do %> And in controller I have this: def menu_add menu_new = Menu.new(...) ... end And with

Re: [Rails] Question about setting database config without database.yml

2011-03-31 Thread Chris Mear
On 31 Mar 2011, at 02:08, kwb wrote: > A little background. > > We are deploying a rails app on jboss by using warbler and the app is > using rails 3.0.3. > > There are several parameters the customer may need to change. Some of > these parameters include database connection information, ie she

[Rails] Re: Ruby on Rails for Tablet Computers (Android OS)

2011-03-31 Thread cipher_neo
yes, the full stack would be required. I am using rails3 btw. On Mar 31, 7:39 am, Igor Spivak wrote: > are you looking for the full rails stack? Or would a ruby-based MVC stack > work for you? Look athttp://rhomobile.com/. > I have used them in the past, and they do what you want, but its not a f

Re: [Rails] Re: why does my method return an error if argument is not a number?

2011-03-31 Thread Michael Pavling
On 30 March 2011 16:45, John Merlino wrote: > Thanks for all the responses. My understanding it's breaking when I try > to pass nothing as an argument to that function because you can't pass > an undefined variable as an argument. What's the error message you get? "divide by zero"? or "1 paramete

Re: [Rails] Re: Ruby on Rails for Tablet Computers (Android OS)

2011-03-31 Thread Igor Spivak
are you looking for the full rails stack? Or would a ruby-based MVC stack work for you? Look at http://rhomobile.com/. I have used them in the past, and they do what you want, but its not a full rails stack, more like a ruby-mvc subset. -igor On Wed, Mar 30, 2011 at 11:37 PM, cipher_neo wrote:

[Rails] Question about setting database config without database.yml

2011-03-31 Thread kwb
A little background. We are deploying a rails app on jboss by using warbler and the app is using rails 3.0.3. There are several parameters the customer may need to change. Some of these parameters include database connection information, ie shema, username, password, host, port, and database. We

[Rails] Is there a way to ignore DST?

2011-03-31 Thread Coderama
I want to save my datetime and display it using a user's TimeZone ignoring DST at all times. Is this possible? -- 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 unsu