Re: [Rails] Setting an addional attribute on the join model in a has_many through relationship

2012-05-01 Thread Colin Law
On 1 May 2012 22:53, Mohamad El-Husseini wrote: >> It depends what you mean by 'work'.  It will assign the type of @role >> to "admin" but the problem is that you have not saved it to the >> database after changing the type. You have not responded to the point above >>  By the way, I advise agai

[Rails] Re: How do you scale horizontally with Rails 3.2 on EC2?

2012-05-01 Thread Frederick Cheung
On May 2, 1:55 am, Claudio Poli wrote: > > So, how do you scale horizontally with Rails 3.2? > Currently I have enough firepower to substain a large amount of users > given the combination of fine tuning, nginx, load balancers, reverse > proxy, rainbows! and whatnot, but firing up another insta

Re: [Rails] RoR Developer

2012-05-01 Thread Cooper Geng
Thanks for ur information. Any further information about this? Cooper On Tue, May 1, 2012 at 11:23 PM, Sandeep Jain < sandeep.j...@softwarepeople.us> wrote: > *Remote work possible.* > > * * > > *Location: Columbia, SC* > > *Duration: 12+ months* > > *Rate: $60/hr* > > * * > > *Daily Responsibi

[Rails] Scaffoldings should be made in a temporary folder.

2012-05-01 Thread Joe Le Brech
When you use rails g scaffold blah blah it will always produce non-final code, so why not have a scaffolds folder with as many dummy code examples as possible which can then be transplanted into the actual production code. For example nested forms or select box code or whatever might be specif

[Rails] RoR Developer

2012-05-01 Thread Sandeep Jain
Remote work possible. Location: Columbia, SC Duration: 12+ months Rate: $60/hr Daily Responsibilities: Ruby coding, using rails, testing, generating ad hoc reports for client as needed, providing daily status updates to team, Presence on internal IM system during work hours. Require

[Rails] ActiveRecord::ConnectionNotEstablished

2012-05-01 Thread viicviicviic
Hey, I im using Rails 3.2.3 for my app, and everything its ok when I run rails s. But when I go to the browser i got this: ActiveRecord::ConnectionNotEstablished And this is the full trace: activerecord (3.2.3) lib/activerecord/connection_adapters/abstract/ connection_pool.rb:398:in retrieve_co

[Rails] Re: plpgsql HEROKU

2012-05-01 Thread Bruno Meira
I'm using the shared database plan -- 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...@googleg

[Rails] plpgsql HEROKU

2012-05-01 Thread Bruno Meira
Hi guys, My application are using some triggers that use plpgsql. That is my first time using HEROKU, so I tried to run rake db:migrate and it sent an error telling that the plpgsql language was not created. Does anybody knows if HEROKU supports this kind of language?? -- Bruno Meira -- You re

[Rails] (eval):1: syntax error, unexpected $undefined

2012-05-01 Thread John Merlino
On rails 3 and ruby 1.9.2, I get this error: (eval):1: syntax error, unexpected $undefined $# = # ^ Not sure where to start with this. Everything looks fine to me: #_main_menu.html.haml #main-menu = menu do |m| = m.submenu "Products" do = m.item "Products", Product #builders_helpe

[Rails] How do you scale horizontally with Rails 3.2 on EC2?

2012-05-01 Thread Claudio Poli
Hello guys, currently I'm running a staging environment which should serve the purpose to replicate the production one as close as possible before the launch. To keep the staging environment's costs down I tried using a series of m1.small instances, the Rails one hosts a stack composed by Rails 3.

Re: [Rails] Setting an addional attribute on the join model in a has_many through relationship

2012-05-01 Thread Mohamad El-Husseini
> It depends what you mean by 'work'. It will assign the type of @role > to "admin" but the problem is that you have not saved it to the > database after changing the type. By the way, I advise against using > type as an attribute name, that is a reserved attribute name for use > with STI. I

Re: [Rails] Re: A Friendlier Login System

2012-05-01 Thread Paul
There is a legitimate and common edge case for this. Many sites have a timeout, so suppose the user is logged in, pulls up a form, then goes to lunch. After lunch they fill out the form and hit submit. Ideally they should be asked for a password, then the form should be submitted seamlessly. I'd s

Re: [Rails] Setting an addional attribute on the join model in a has_many through relationship

2012-05-01 Thread Colin Law
On 1 May 2012 17:05, Mohamad El-Husseini wrote: > I have User, Account, and Role models. The Account model accepts nested > properties for users. This way users can create their account and user > records at the same time. > > class AccountsController < ApplicationController >   def new >     @acc

[Rails] Re: Flot won't Plot

2012-05-01 Thread Shun Takeda
Ok I got it Ruby code: @o={}; @o= {'label' => "A", 'data' => @example.collect{|x| [Time.utc(x.date).to_i, x.num]}} Java code: $(function () { var obj = <%= @o.to_json %>; var options = { lines: { show: true }, points: { show: true }, xaxis: { mode: "time", timeformat: "%

[Rails] Validador de CNPJ

2012-05-01 Thread ttaranto
Alguém poderia me informar o que está errado com o cógido abaixo? https://gist.github.com/2570459 Não estou conseguindo encontrar o erro... -- 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

[Rails] Re: Authentication

2012-05-01 Thread Daniel Coston
Frederick Cheung wrote in post #1059064: > On May 1, 2:00pm, Daniel Coston wrote: >> Application will not authenticate [sends alert of invalid credentials]. >> Using user credentials created via rake db:seed. How do I get it to >> authenticate? >> >> Agent Model >> >> >>def Ag

[Rails] Re: Authentication

2012-05-01 Thread Daniel Coston
Colin Law wrote in post #1059060: > On 1 May 2012 14:00, Daniel Coston wrote: >> Application will not authenticate [sends alert of invalid credentials]. >> Using user credentials created via rake db:seed. How do I get it to >> authenticate? > > Which bit is not working? See the Rails Guide on deb

[Rails] Re: CSV Import Issue

2012-05-01 Thread Rick
You'll probably have better results if you use the read method. CSV.parse is meant to be applied to a String. >From the docs: * parse( str, options = Hash.new ) { |row| ... } click to toggle source parse( str, options = Hash.new ) This method can be used to easily parse CSV

[Rails] Ruby/RoR positions in NYC and Raleigh, NC

2012-05-01 Thread Aurelio S.
Hi everyone, I have multiple positions for seasoned Ruby/Ruby on Rails developers; roles are based in NYC or Raleigh, NC. Really cool company and project work; great pay and team environment. Please feel free to e-mail me directly, and I can share details. Thanks! Aurelio Aurelio Sisto | Sr. A

Re: [Rails] CSV Import Issue

2012-05-01 Thread Michael Pavling
On 1 May 2012 17:29, Rahul B. wrote: > I am getting an error "NoMethodError". The error would have told you which line and file the error was on. If you can share that information, then it may be easier to help suggest solutions. -- You received this message because you are subscribed to the Go

[Rails] CSV Import Issue

2012-05-01 Thread Rahul B.
Hi, This seems to be a very small error but I cannot find any solution to this problem.. I am trying to use the CSV gem in my rails(3.2) application(ruby 1.9.3) and I am getting an error "NoMethodError". My controller is: require 'csv' def import file = params[:file] <-- error CSV.p

[Rails] Re: Setting an addional attribute on the join model in a has_many through relationship

2012-05-01 Thread Mohamad El-Husseini
My question can be succinctly put: Is it possible to set an additional attribute on the join model when usingaccepts_nested_attributes_for? On Tuesday, May 1, 2012 12:05:05 PM UTC-4, Mohamad El-Husseini wrote: > > I have User, Account, and Role models. The Account model accepts nested > propert

[Rails] Re: Can't mass-assign protected attributes even if I use attr_accessible

2012-05-01 Thread Kevin Gillieron
I found the solution ! :-) The problem was that I used acts_as_taggable_on_steroids plugin which does not work on Rails 3.2 ... Since "Author" is the only model which has a :name attribute, I thought that the problem came from Author ... but the problem was in the Tag model (which is in the acts_

Re: [Rails] uninitialized constant LoginController in Ruby

2012-05-01 Thread Colin Law
On 1 May 2012 10:34, Satyajit Sarangi wrote: > This is my environment.rb > > # Load the rails application > require File.expand_path('../application', __FILE__) > > # Initialize the rails application > Qstack::Application.initialize! > require 'koala' > > This is my application_controller.rb > > c

[Rails] Re: A Friendlier Login System

2012-05-01 Thread Robert Walker
Doug Jolley wrote in post #1058675: > "Agile Web Development with Rails" discusses a friendlier login > system. Basically, if a user follows a link on Page A to Page B and > Page B is login-protected, my understanding is that the user would be > diverted to the login page. Upon successfully compl

[Rails] Re: SQLite3 to Postgre Problem

2012-05-01 Thread Tim Shaffer
The error message is telling you the problem: relation "appointments" does not exist Can you post the contents of your CreateAppointments migration file? I'm assuming this is where the appointments table should be created. -- You received this message because you are subscribed to the Goo

[Rails] Re: Authentication

2012-05-01 Thread Frederick Cheung
On May 1, 2:00 pm, Daniel Coston wrote: > Application will not authenticate [sends alert of invalid credentials]. > Using user credentials created via rake db:seed. How do I get it to > authenticate? > > Agent Model > > >       def Agent.authenticate(name,password) >         if

[Rails] uninitialized constant LoginController in Ruby

2012-05-01 Thread Satyajit Sarangi
This is my environment.rb # Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Qstack::Application.initialize! require 'koala' This is my application_controller.rb class ApplicationController < ActionController::Base # protect_from

Re: [Rails] Authentication

2012-05-01 Thread Colin Law
On 1 May 2012 14:00, Daniel Coston wrote: > Application will not authenticate [sends alert of invalid credentials]. > Using user credentials created via rake db:seed. How do I get it to > authenticate? Which bit is not working? See the Rails Guide on debugging for help on how to debug your code.

[Rails] Re: Adobe Air and Rails

2012-05-01 Thread Robert Walker
Lee Farrell wrote in post #1059057: > Is it possible to wrap a HTML5 jquery app that is served up by a rails > app > in an adobe air app that is installable on multiple platforms? > > I don't know much about adobe air, but the effect I am trying to achieve > is > to bring the web app to the desktop

[Rails] Authentication

2012-05-01 Thread Daniel Coston
Application will not authenticate [sends alert of invalid credentials]. Using user credentials created via rake db:seed. How do I get it to authenticate? Agent Model def Agent.authenticate(name,password) if agent = find_by_name(name) if agent.hash == encry

[Rails] Adobe Air and Rails

2012-05-01 Thread cipher_neo
Is it possible to wrap a HTML5 jquery app that is served up by a rails app in an adobe air app that is installable on multiple platforms? I don't know much about adobe air, but the effect I am trying to achieve is to bring the web app to the desktop via an installable exe with not a lot of work

[Rails] Engine: access to url_helpers otside view/controller

2012-05-01 Thread Sergey Ezhov
I use Engine. How to get access to url_helpers, such as _path or __url, in a separate class? In application it simple: Rails.application.routes.url_helpers._path But how to get access to url_helpers in Engine? When I use Rails.application.routes.url_helpers.root_path, then I get '/', root of Appli

[Rails] Re: Getting Years, Months and days from a day of born

2012-05-01 Thread Dheeraj Kumar
You're looking for the time_diff gem. https://github.com/abhidsm/time_diff Dheeraj Kumar On Tuesday 1 May 2012 at 1:52 PM, Amir Z. wrote: > Hi Gonzalez, > > We can create script using present date and date of born. > > Years = present year - birth year > Days= present date - birth date > M

[Rails] Re: Getting Years, Months and days from a day of born

2012-05-01 Thread Amir Z.
Hi Gonzalez, We can create script using present date and date of born. Years = present year - birth year Days= present date - birth date Months = present month - birth month Is it you looking for? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: Re: Re: Re: Re: ArgumentError: Bad fixture argument 2 during creation of User fixture

2012-05-01 Thread Amir Z.
> yml is very strict about formatting. You need spaces at the front of > nested lines, so > valid_user: > id: 1 > screen_name: foobar > email: foo...@gmail.com > password: foobar > remember_me: > authorization_token: 1 > > Note the spaces in front of id:, screen_name: and so on. Coli

Re: [Rails] keen on writing?

2012-05-01 Thread Sameer Agarwal
Hi Neil, I know you've mentioned this article needs to be written by a Rails Expert. I'm a techie - but a RoR newbie. I was wondering if you would like to use a thought piece from a newbie about RoR and how it kind of ties up together for someone who wants to build an App but doesn't want to get