Re: [Rails] rendering instance value to partial views from controller

2013-04-04 Thread Thota praneeth
i have tried x1 and y1 also still i didn't get the graph it is showing empty page, but when i render that @x1 or x1 in text_field_tag it is displaying. How can i pass that variables in javascript On Fri, Apr 5, 2013 at 1:08 AM, Colin Law wrote: > On 4 April 2013 18:18, Praneeth wrote: > > hi i

Re: [Rails] Re: help me test how many requests can be available for one server in Ruby On Rails?

2013-04-04 Thread Jeffrey Jones
On 05/04/13 01:16, Robert Walker wrote: haxuan lac wrote in post #1103604: I am try test how many requests can be available for one server in Ruby On Rails but i don't know how to do? I read some Page but i want ask some one can explaint more clearly this problem. If someone had done this proble

Re: [Rails] Redirect_to without reload?

2013-04-04 Thread Scott Ribe
On Apr 4, 2013, at 7:50 PM, Dave Castellano wrote: > I have considered saving > when leaving page and redirecting to edit/update form but cant save data > unless all fields filled out due to validation. Well, you can put what the user entered in the session, which you should really be careful ab

[Rails] Redirect_to without reload?

2013-04-04 Thread Dave Castellano
Hi, I am slowly learnng ROR and wondering if anyone can point me in the general direction to go with the following problem. User is filling out a form (question model) and needs to leave the page to select an image from a gallery (picture model). When the user selects and saves the image they

Re: [Rails] rendering instance value to partial views from controller

2013-04-04 Thread Colin Law
On 4 April 2013 18:18, Praneeth wrote: > hi i have a problem in graphs: > am representing data in graphical view and in that i put from date, end date > and search button > when i select from date, end date and when i press search, values are going > into controller through ajax and rendering part

Re: [Rails] Confusion over Postgres usernames/passwords/databasenames

2013-04-04 Thread Craig White
On Apr 4, 2013, at 7:32 AM, Jason Hsu, Android developer wrote: > I have a Ruby script > (https://github.com/jhsu802701/bsf-scrape/blob/master/scrape.rb) that scrapes > web pages and stores the results in a Postgres database. I'm trying to set > this up not only in the development environment

[Rails] rendering instance value to partial views from controller

2013-04-04 Thread Praneeth
hi i have a problem in graphs: am representing data in graphical view and in that i put from date, end date and search button when i select from date, end date and when i press search, values are going into controller through ajax and rendering partial but i can't able to pass the instance varia

[Rails] Re: help me test how many requests can be available for one server in Ruby On Rails?

2013-04-04 Thread Robert Walker
haxuan lac wrote in post #1103604: > I am try test how many requests can be available for one server in Ruby > On Rails but i don't know how to do? > I read some Page but i want ask some one can explaint more clearly this > problem. > If someone had done this problem can give me some advice?Thanks

Re: [Rails] heruko performance vs shared hosting performance

2013-04-04 Thread Hassan Schroeder
On Thu, Apr 4, 2013 at 7:38 AM, John Merlino wrote: would you notice a significant performance downgrade if the site is > moved to heroku on 1 dyno? > Given that the heroku entry tier is free and super easy to set up, why not just deploy an existing app you're familiar with and compare the perfo

[Rails] Re: heruko performance vs shared hosting performance

2013-04-04 Thread Jason Hsu, Android developer
Heroku is prohibitively expensive, and GoDaddy is the Wal-Mart of web hosts. Why not use WebFaction? It's much better than GoDaddy and much cheaper than Heroku. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this g

Re: [Rails] heruko performance vs shared hosting performance

2013-04-04 Thread Matthew Witek
One thing to note on the heroku free service. They will shutdown your dyno after 30 mins of inactivity and the next user to visit the site will have a lengthy load time since the dyno has to restart on the next request. If you do decide to go with heroku pay for the extra dyno and you won't ha

[Rails] heruko performance vs shared hosting performance

2013-04-04 Thread John Merlino
This guy is using godaddy shared hosting for his wordpress blog. I think it's currently $5 a month. I was thinking to use Rails for his next project. But I wouldn't want costs to exceed more than $20 per month. I contacted heroku and they said that 1 dyno is free to host your ruby on rails app and

[Rails] heruko performance vs shared hosting performance

2013-04-04 Thread John Merlino
This guy is using godaddy shared hosting for his wordpress blog. I think it's currently $5 a month. I was thinking to use Rails for his next project. But I wouldn't want costs to exceed more than $20 per month. I contacted heroku and they said that 1 dyno is free to host your ruby on rails app and

[Rails] Confusion over Postgres usernames/passwords/databasenames

2013-04-04 Thread Jason Hsu, Android developer
I have a Ruby script (https://github.com/jhsu802701/bsf-scrape/blob/master/scrape.rb) that scrapes web pages and stores the results in a Postgres database. I'm trying to set this up not only in the development environment but in a production environment as well, and the production environment

[Rails] Re: validates uniqueness scope allow_blank/allow_nil -> validation error

2013-04-04 Thread Андрей Большов
think it should be: validates :game_id, uniqueness: {scope: :genre_id, allow_blank: true} среда, 3 апреля 2013 г., 13:56:48 UTC+4 пользователь Lephyrius написал: > > I have this in a model: > class GenreBadge < ActiveRecord::Base > > belongs_to :game, counter_cache: :genre_badges_count, touch

Re: [Rails] Help with single page application structure

2013-04-04 Thread Johan Vauhkonen
I've initially made a HomeController that serves the initial index view (with it set as the root in routes) but I think I like the /public way better. Thanks for the idea! On Thursday, 4 April 2013 14:31:09 UTC+2, tamouse wrote: Absolutely, you can go so far as to have your SPA initial downlo

Re: [Rails] Help with single page application structure

2013-04-04 Thread Walter Lee Davis
On Apr 4, 2013, at 8:31 AM, tamouse mailing lists wrote: > > On Apr 4, 2013 7:20 AM, "Johan Vauhkonen" wrote: > > > > Is it a viable alternative to separate client and back end? > > > > To have AngularJS take care of everything client side and Rails take care > > of only the back end? > > > >

[Rails] Re: Help with error messages

2013-04-04 Thread andreo
can you show us the piece of code you using to handle the success case? flash is an hash with very useful entries: inside your controller you should be doing something like: flash[:error] = object.errors or something like that if you pass us your controller code it would be easier to help you a

Re: [Rails] Start to using Bootstrap with RoR

2013-04-04 Thread Greg Akins
http://railsapps.github.com/twitter-bootstrap-rails.html Greg Akins http://twitter.com/akinsgre On Thu, Apr 4, 2013 at 8:11 AM, Mehmet Vefa wrote: > Hey there, I am beginner of RoR. I want to use bootstrap at my project. > Which point should I start? > > -- > You received this message because

[Rails] Start to using Bootstrap with RoR

2013-04-04 Thread Mehmet Vefa
Hey there, I am beginner of RoR. I want to use bootstrap at my project. Which point should I start? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyo

[Rails] Re: What is Javascript-Runtime for?

2013-04-04 Thread Frederick Cheung
On Thursday, April 4, 2013 1:14:01 PM UTC+1, Peter wrote: > > Hello Everyone, > > Can anyone please describe the relationship of javascript-runtime to Ruby > on Rails? In Mac OSX, I do not get this error, but in Linux for every new > project generated by "rails new", I get: > >> play$ rails s >

Re: [Rails] Help with single page application structure

2013-04-04 Thread tamouse mailing lists
On Apr 4, 2013 7:20 AM, "Johan Vauhkonen" wrote: > > Is it a viable alternative to separate client and back end? > > To have AngularJS take care of everything client side and Rails take care of only the back end? > Absolutely, you can go so far as to have your SPA initial download be a static ind

Re: [Rails] Help with single page application structure

2013-04-04 Thread Johan Vauhkonen
Is it a viable alternative to separate client and back end? To have AngularJS take care of everything client side and Rails take care of only the back end? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group a

Re: [Rails] Help with single page application structure

2013-04-04 Thread tamouse mailing lists
On Apr 4, 2013 1:35 AM, "Johan Vauhkonen" wrote: > > I think for me, using Sinatra would mean I'd have to write a lot of things that Rails bring which I don't want to Agreed; we were talking alternatives and for his needs, he really only needed the pipeline.I was just trying to illustrate that st

[Rails] What is Javascript-Runtime for?

2013-04-04 Thread Peter
Hello Everyone, Can anyone please describe the relationship of javascript-runtime to Ruby on Rails? In Mac OSX, I do not get this error, but in Linux for every new project generated by "rails new", I get: > play$ rails s > > //.rvm/gems/ruby-2.0.0-p0/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Johan Vauhkonen
That kind of scenario was what I had initially in mind. Everyone has the same models, just not the same database. 2013/4/4, Simon Macneall : > We have toyed with creating separate databases for each customer as our > combined one is starting to get quite large. In our case, the models will > alway

[Rails] Error in controller Namespace of Route --Rails

2013-04-04 Thread haxuan lac
I'm trying to work with controller Namespace of Route. i'm doing with instructions in : http://guides.rubyonrails.org/routing.html and here is code of my Route: namespace :admin do resources :users end I created admin folder admin and move controller users_controller to it. And I edit code in

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Simon Macneall
We have toyed with creating separate databases for each customer as our combined one is starting to get quite large. In our case, the models will always be the same no matter which database you are connecting to, so there isn't any meta-programming involved. It's just a case of switching da

[Rails] Re: Help me with :only in Route of Rails

2013-04-04 Thread haxuan lac
Thanks Colin. I'm learning step by step Ruby on Rails with Railstutorial.org I solved my problem. -- 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 unsubscribe from this group and stop receivin

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Julian Leviston
Okay... So to do this, you need to understand meta-programming to a degree because that's what you're doing. In normal Rails, you'd create a model as part of the development process, but what you're doing is creating some code that creates models itself (ie one level of abstraction higher than

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Jeffrey Jones
Assuming you are using postgresql you might be interested in this railscast (paid) http://railscasts.com/episodes/389-multitenancy-with-postgresql Which takes advantage of being able to have multiple schemas in PostgreSQL. Be aware though that it will make your initial coding more complicated

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Johan Vauhkonen
Thanks for posting, I appreciate the feedback. I'll start with keeping everything within a single database and take it from there. You are right Julian in that I am new with RoR and what I've asked for is advanced. I'm still curious though how creating databases dynamically would be done so if i

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Julian Leviston
On 04/04/2013, at 6:05 PM, Johan Vauhkonen wrote: > Thanks for replying, Julian. > > Can you point me to any resources that describe how to do it? > > I agree that I should not optimize prematurely but what I'm considering is > which is easier, > to go with dynamically creating databases from

Re: [Rails] strange behavior with active relation any? method

2013-04-04 Thread DALVIR SINGH KHOSA
hola por favor yo quiero baja rubyonrails-talk este ymail gracias On 03/04/2013, Colin Law wrote: > On 3 April 2013 20:58, John Merlino wrote: >> In console, I run the following and any? returns true: >> drivers = Driver.select("drivers.*, >> drivers.id").joins([:reports, :driving_habits])

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Colin Law
On 4 April 2013 07:29, Johan Vauhkonen wrote: > Is it possible to dynamically create new databases and tables within them > with Rails? > > Or is that a task best done manually? > > I'm creating an application which should allow users to store their own > statistics information (which can and prob

Re: [Rails] Dynamically create databases?

2013-04-04 Thread Johan Vauhkonen
Thanks for replying, Julian. Can you point me to any resources that describe how to do it? I agree that I should not optimize prematurely but what I'm considering is which is easier, to go with dynamically creating databases from the start or to extract data from the single database to new data

Re: [Rails] Help me with :only in Route of Rails

2013-04-04 Thread Colin Law
On 4 April 2013 06:29, haxuan lac wrote: > I'm learning with routing in rails from : > http://guides.rubyonrails.org/routing.html > and I have first code : resources :users > and last code: resources :users, :only => [:index, :show] > and have error : > undefined method `edit_user_path' f