[Rails] Re: How to use Ajax with rails ?

2012-10-29 Thread 1334
On Friday, October 26, 2012 5:38:20 PM UTC+2, Fahim Patel wrote: Hi all, Can any one tell me how to use Ajax with Rails. Send me quick start up link and videos. Thanks Regards Fahim Babar PAtel it's still in edgeguides but it's a nice intro written by @steveklabnik (if i'm

[Rails] Re: Radiant could not be initialized. Please verify that vendor/radiant contains a complete copy of the

2012-10-29 Thread Nirav
i have re-install rails, ruby, rubygems and radiant. is it any idea for this error to anyone what to do after that? i am confused for that. because same configuration is there for locally and its work fine. but for ec2 server it gets error. anyone knows about this error? i am stuck at that

[Rails] Newbie - deployment, hosting

2012-10-29 Thread yaniv pr
Hello, So, after learning ruby on rails and building a great app on my local machine, I need to find a host, deploy, and of course maintain a (staging and) production environment. This all seems very confusing, and I'd like to learn this in an organized manner, step by step: I've come across

Re: [Rails] Newbie - deployment, hosting

2012-10-29 Thread Colin Law
On 29 October 2012 13:32, yaniv pr yani...@gmail.com wrote: Hello, So, after learning ruby on rails and building a great app on my local machine, I need to find a host, deploy, and of course maintain a (staging and) production environment. Have you considered Heroku? They are generally well

Re: [Rails] Newbie - deployment, hosting

2012-10-29 Thread yaniv pr
Thanks for your answer, I may go for it. The thing is, I'd really love to know what I'm doing, and eventually master this subject. On Monday, October 29, 2012 3:41:03 PM UTC+2, Colin Law wrote: On 29 October 2012 13:32, yaniv pr yan...@gmail.com javascript: wrote: Hello, So, after

[Rails] Re: How to use Ajax with rails ?

2012-10-29 Thread 张成栋
when you use link_to or button_to tag, be sure the trigger remote setted to true, like %=linke_to Button, contrl_path, remote: true%. then you should write a template contrl_action.js.erb in that view folder and name same as the action, that will be your ajax scriptting template for that very

[Rails] Re: Ajax test not working

2012-10-29 Thread 张成栋
dude, you miss a lot. in *.js.erb blablabla, looks fine in controler you miss format.js in router you miss resource contoler_name do get: :getDiagram on :member # or post or whatever, that will be your method name in link_to tag end in erb tamplate %= link_to Button,

[Rails] Re: Rails Installer Problem

2012-10-29 Thread Colm Ginty
I wonder if you could tell me how to find the 'ssh directory'. I've looked and looked and can't find the key in my RoR files. I have the same problem where the command prompt line told me that the ssh key had copied to my clipboard but in fact it hadn't. On Sunday, July 24, 2011 9:15:12 PM

[Rails] [4.0] Wrong asset path in engines

2012-10-29 Thread Mathieu Robardey
hey, I'm refactoring an application that live on rails edge. I have created a mountable engine named Admin mount Admin::Engine, at: /admin %= stylesheet_link_tagadmin/application, media: all % the link generated by sprockets is wrong, i'm getting link

[Rails] Re: combine 'group' and 'order' in joined tables

2012-10-29 Thread Javix
Finally, here is the solution I came to: @operations = Client.joins(:operations).select('clients.id,firstname, lastname, sum(total) as total').group('clients.id, firstname,lastname,total').paginate(page: params[:page]) It is not a will_paginate or smth eles problem, just PostgreSQL is more

Re: [Rails] Newbie - deployment, hosting

2012-10-29 Thread Dave Aronson
On Mon, Oct 29, 2012 at 9:39 AM, Colin Law clan...@googlemail.com wrote: Have you considered Heroku? They are generally well thought of. +1 Also, I recently wrote a blog post on having staging and production environments on Heroku. See:

[Rails] Rails and services - Architecture question

2012-10-29 Thread PierreW
Hi guys! We have moved a part of our Rails app into a service, i.e. a Ruby script that is demonized and communicates with the main app through a message queue. This service needs to know about the models in the Rails app, but it does not need a database connection. Indeed, we are making sure that

Re: [Rails] Rails and services - Architecture question

2012-10-29 Thread Colin Law
On 29 October 2012 15:50, PierreW wamre...@googlemail.com wrote: Hi guys! We have moved a part of our Rails app into a service, i.e. a Ruby script that is demonized and communicates with the main app through a message queue. This service needs to know about the models in the Rails app, but

Re: [Rails] Rails and services - Architecture question

2012-10-29 Thread Bill Walton
Hi Pierre, On Mon, Oct 29, 2012 at 10:50 AM, PierreW wamre...@googlemail.com wrote: Hi guys! We have moved a part of our Rails app into a service, i.e. a Ruby script that is demonized and communicates with the main app through a message queue. This service needs to know about the models in

[Rails] Re: Rails and services - Architecture question

2012-10-29 Thread PierreW
Hi Colin, Bill Here is what we are doing: - we pass to our service the Model objects (we Marshal.dump them in the main app, enqueue them, and the service Marshal.load them) instead of their unique ID. - in the service, we just need to access some of the models' methods. We know these methods

Re: [Rails] Re: Rails and services - Architecture question

2012-10-29 Thread Bill Walton
Hi Pierre, On Mon, Oct 29, 2012 at 11:23 AM, PierreW wamre...@googlemail.com wrote: Hi Colin, Bill Here is what we are doing: - we pass to our service the Model objects (we Marshal.dump them in the main app, enqueue them, and the service Marshal.load them) instead of their unique ID. -

Re: [Rails] Re: Rails and services - Architecture question

2012-10-29 Thread Colin Law
On 29 October 2012 16:23, PierreW wamre...@googlemail.com wrote: Hi Colin, Bill Here is what we are doing: - we pass to our service the Model objects (we Marshal.dump them in the main app, enqueue them, and the service Marshal.load them) instead of their unique ID. - in the service, we

Re: [Rails] Re: Rails Installer Problem

2012-10-29 Thread Norbert Melzer
Where your ssh dir is, aber depends on your version of windows, the used ssh client and if you are using cygwin or msys or non of them. So please give some more details about your environment. Am 29.10.2012 15:47 schrieb Colm Ginty cgi...@tcd.ie: I wonder if you could tell me how to find the

Re: [Rails] Re: Rails Installer Problem

2012-10-29 Thread Jordon Bedwell
Install github for Windows so it will manage your keys and everything for you automatically, it's truly the easiest way to Work with git on Windows if it's your first time with Git. On Mon, Oct 29, 2012 at 12:25 PM, Norbert Melzer timmel...@gmail.com wrote: Where your ssh dir is, aber depends on

[Rails] Validation messages and $.parseJSON(xhr.responseText).errors

2012-10-29 Thread Akvarel
Hello! I try to catch a validation message with a `$.parseJSON(xhr.responseText).errors` but an alert message hows me undefined and I do not understand why. hier are my validations: validates :upload_file_name, :presence = true, :format

Re: [Rails] Re: Rails Installer Problem

2012-10-29 Thread Colm Ginty
Thanks Norbert and Jordan, I found the ssh directory. I realise in hindsight that I should have done some more searching before I posted the question. I'm still getting the hang of this software lark (I'm a complete beginner!) I am working with GitHub, although I'm having some serious trouble

[Rails] Rendering a partial with ajax/jquery

2012-10-29 Thread arturo drlt
Hi there i have this issue I have a view that render a partial for each member inside the object @foo and I have a function for infinite scroll so the server will be doing request after request while scrolling down but I don't know exactly how to make this work here is some of my code: def

[Rails] Saving values to the db as metric but displaying/editing in imperial.

2012-10-29 Thread Frank Mattia
I have a requirement to store values in a database as unitless decimals(12,9) which will be presumed to be metric values. For display/editing purposes I need the user to be able to choose their input method -- no mixing and matching on a form, just a simple User#current_units call to determine

[Rails] Re: Rails and services - Architecture question

2012-10-29 Thread PierreW
Thanks a lot guys for pointing me in the right direction. I ended up extracting the methods I needed from the models. It is much cleaner. Thanks! PJ On Oct 29, 5:19 pm, Colin Law clan...@googlemail.com wrote: On 29 October 2012 16:23, PierreW wamre...@googlemail.com wrote: Hi Colin, Bill

Re: [Rails] Saving values to the db as metric but displaying/editing in imperial.

2012-10-29 Thread Scott Ribe
Unless I'm missing something, you want a setter and getter for a virtual attribute: say DiameterStr and DiameterStr=, which perform or not the conversion as needed. Then you always reference f.text_field :DiameterStr. You could always play around with making the underlying attributes private,