Re: [Rails] Iterate over a set of classes

2014-04-11 Thread Colin Law
On 10 April 2014 22:20, Jan Yo li...@ruby-forum.com wrote: I have class A and B. A has many Bs. B has a field is_visible which can be true or false I have alot of As as well I can acquire a set of As by doing the follwoing: @As = X.find_by... Need to iterate over all the As, and return

[Rails] Re: how to delete drop down select value in ROR

2014-04-11 Thread Maese
I´m not sure that you can use the collection_select with a link, better use a form try something like: VIEW %= form_tag( :controller =Catvalues, :action = detroy, method = delete do % %= collection_select(:catvalue, :id, @catvalues, :id, :v_name, {}, class: 'drop-down')% %=

[Rails] Re: Iterate over a set of classes

2014-04-11 Thread Maese
B.where(a_id: @As) if you have a massive amounts of Bs the Data Base server will hate you,so a better solution is @Bs=Array.new @As.each do |a| @Bsa.bs end El jueves, 10 de abril de 2014 23:20:53 UTC+2, Ruby-Forum.com User escribió: I have class A and B. A has many Bs. B has a field

[Rails] Re: Iterate over a set of classes

2014-04-11 Thread Ignacio Toscano
Ups i forget the visible condition B.where(a_id: @As, is_visible: true) if you have a massive amounts of Bs the Data Base server will hate you,so a better solution is @Bs=Array.new @As.each do |a| @BsB.where(a_id: a, is_visible: true) end -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Antonio Arcos
Hello developers, I am in trouble. When I load my web page, it returns we're sorry, but somethig went wrong and then I have seen my log and it returns this error: Started GET / for 141.21.12.238 at 2014-04-11 09:39:10 +0200 Processing by Refinery::PagesController#home as HTML

[Rails] Re: Iterate over a set of classes

2014-04-11 Thread Maese
Ups i forget the visible condition B.where(a_id: @As, is_visible: true) if you have a massive amounts of Bs the Data Base server will hate you,so a better solution is @Bs=Array.new @As.each do |a| @Bsa.bs.select{ |b| b.is_visible} end El jueves, 10 de abril de 2014 23:20:53 UTC+2,

[Rails] [Design] Inviting contributions to GlitterGallery - a collaboration space for open source designers.

2014-04-11 Thread Sarup Banskota
Hello everyone! I'm a 20 year old student from India, part of Fedora design team. Along with a couple of design team folks, I've been tinkering on a project that aims to ease designer collaboration, we're calling it GlitterGallery. It's a Ruby on Rails application, completely open source,

Re: [Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Colin Law
On 11 April 2014 08:51, Antonio Arcos elchatarrerode...@gmail.com wrote: Hello developers, I am in trouble. When I load my web page, it returns we're sorry, but somethig went wrong and then I have seen my log and it returns this error: Started GET / for 141.21.12.238 at 2014-04-11 09:39:10

[Rails] Replacement for has_many ... counter_sql in Rails 4.1

2014-04-11 Thread Svoop
Hi I'm looking for ways to replace has_many ... counter_sql: '...' in order to migrate an app from Rails 3.2 to 4.0 (done) and then up to 4.1 which has dropped support for counter_sql. An example is on Stackoverflow:

Re: [Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Antonio Arcos
Yes I have the table in the database but I do not why it don´t found. here my role.rb: module Refinery class Role Refinery::Core::BaseModel has_and_belongs_to_many :users, :join_table = :refinery_roles_users before_validation :camelize_title validates :title, :uniqueness = true

Re: [Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Colin Law
On 11 April 2014 14:07, Antonio Arcos elchatarrerode...@gmail.com wrote: Yes I have the table in the database but I do not why it don´t found. here my role.rb: How do you know that the table refinery_roles is in the db? Post the contents of db/schema.rb here. Colin module Refinery class

Re: [Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Antonio Arcos
my schema contents: # encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note

[Rails] Re: Iterate over a set of classes

2014-04-11 Thread Matt Jones
On Friday, 11 April 2014 07:13:25 UTC-4, Ruby-Forum.com User wrote: Ups i forget the visible condition B.where(a_id: @As, is_visible: true) if you have a massive amounts of Bs the Data Base server will hate you,so a better solution is @Bs=Array.new @As.each do |a|

Re: [Rails] Error ActiveRecord::StatementInvalid

2014-04-11 Thread Colin Law
On 11 April 2014 14:54, Antonio Arcos elchatarrerode...@gmail.com wrote: my schema contents: # encoding: UTF-8 ... ActiveRecord::Schema.define(:version = 20120717180765) do First could you not top post please, it makes it difficult to follow the thread. Thanks. The above looks strange,

[Rails] Rails 4 Postgres Array attribute: how can I ensure that the attribute is an array during validation?

2014-04-11 Thread Moncef Belyamani
Hi, I just started experimenting with the native Postgress array type in Rails 4, and I'm running into an issue I can't figure out. I want the app to raise an error if the value for an array attribute is not an array. Before, when I was using a regular text type for the field, and

[Rails] Re: Replacement for has_many ... counter_sql in Rails 4.1

2014-04-11 Thread Frederick Cheung
On Friday, April 11, 2014 2:05:54 PM UTC+1, Svoop wrote: Hi I'm looking for ways to replace has_many ... counter_sql: '...' in order to migrate an app from Rails 3.2 to 4.0 (done) and then up to 4.1 which has dropped support for counter_sql. An example is on Stackoverflow:

Re: [Rails] Rails 4 Postgres Array attribute: how can I ensure that the attribute is an array during validation?

2014-04-11 Thread Jordon Bedwell
Try adding `return false` Thanks, Jordon Bedwell https://envygeeks.com On 4/11/2014 10:18:09 AM, Moncef Belyamani mon...@codeforamerica.orgwrote: Hi, I just started experimenting with the native Postgress array type in Rails 4, and I'm running into an issue I can't figure out. I want the app to

[Rails] Michael Hartl's ROR Tutorial: CH 7 Sign up form ISSUES!!!

2014-04-11 Thread Colin Stodd
So I've gone over this tutorial, literally recreated the app 4 times but I keep getting stuck at the create user with a form in Ch 7. Rails 3 edition. From what I can tell, there is no action (Post) being created when I click on the submit button (no user being created, or errors being

[Rails] Re: Michael Hartl's ROR Tutorial: CH 7 Sign up form ISSUES!!!

2014-04-11 Thread Frederick Cheung
On Friday, April 11, 2014 7:37:53 PM UTC+1, Colin Stodd wrote: So I've gone over this tutorial, literally recreated the app 4 times but I keep getting stuck at the create user with a form in Ch 7. Rails 3 edition. From what I can tell, there is no action (Post) being created when I click on

[Rails] Re: Michael Hartl's ROR Tutorial: CH 7 Sign up form ISSUES!!!

2014-04-11 Thread Colin Stodd
I wish I could buy you a drink of your choice Frederick. Thank you for taking the time to look over my post! It's truly appreciated! On Friday, April 11, 2014 4:39:42 PM UTC-4, Frederick Cheung wrote: On Friday, April 11, 2014 7:37:53 PM UTC+1, Colin Stodd wrote: So I've gone over this

[Rails] Rebels vs Chiefs Live Super Rugby

2014-04-11 Thread Mesu Mesubabu
http://adelaide.backpage.com/TicketsForSale/stream-rebels-vs-chiefs-live-super-rugby-tv/4611142 http://adelaide.backpage.com/TicketsForSale/stream-rebels-vs-chiefs-live-super-rugby-tv/4611142 http://adelaide.backpage.com/TicketsForSale/stream-rebels-vs-chiefs-live-super-rugby-tv/4611142

[Rails] Crusaders vs Cheetahs Live Rugby tv

2014-04-11 Thread Mesu Mesubabu
http://brisbane.backpage.com/TicketsForSale/stream-crusaders-vs-cheetahs-live-rugby-tv/4611147 Crusaders vs Cheetahs Live Rugby Super, Enjoy Crusaders vs Cheetahs super rugby online live stream on TV, Sky TV network Super Rugby tv Broadcast, Stream online Crusaders v Cheetahs live on TV, Stream tv

[Rails] Re: JOB POST: why is it so hard to find a Ruby Rails developer for a job in Downtown NYC?

2014-04-11 Thread Dexter Deng
Martin Streicher wrote in post #1140391: If you are a senior Ruby dev and are looking for remote work, I know of a great job in Atlanta. (I am not a recruiter. I am also a Ruby dev.) Drop me a line and I can make connections. -- Martin @ Martin I'm looking for a remote job.

[Rails] Cheetahs vs Crusaders live Super Rugby Online Stream

2014-04-11 Thread Mesu Mesubabu
http://livetvstream.over-blog.com/2014/04/cheetahs-vs-crusaders-live-free.html http://livetvstream.over-blog.com/2014/04/cheetahs-vs-crusaders-live-free.html http://livetvstream.over-blog.com/2014/04/cheetahs-vs-crusaders-live-free.html