similar to: use/ignore index as a scope - rails 3

Displaying 20 results from an estimated 70000 matches similar to: "use/ignore index as a scope - rails 3"

2011 Oct 30
2
Could not find rails (>= 0) amongst [bundler-1.0.21]
Hello, I''m new to Ruby and unix/linux development (although been building .net apps for years). I''ve almost completed my trek to install Rails ... looks like I have one final hurdle. After installing rails I try the ''rails -v'' command and it fails. Any help here would be deeply appreciated. Here''s the output from my bash session: bash-3.2$ ruby
2011 Jun 04
0
Rails 3.1 : Complex database query with Arel 2
Hi, I''ve search for documentations on queries with Arel 2 but there is pretty nothing and all I''ve found is for Arel 1 so I''ve run into NoMethodError: undefined method `[]'' for #<Arel::SelectManager:0x00000003f1b820> errors with join syntax. My query is barely simple but involve nesting queries. I have 4 tables. Assets, Deposits, Orders and OrderLines
2012 Apr 23
1
Searching and returning arrays
im a begginer in RoR and am using rails 3.2.3 and ruby 1.8.7 This forum has helped me to progress but I''m confused by one thing. My app is supposed to allow seaching for results depending on the check boxes that are checked. In my case, when the user checks a determined facility and clicks "search" the corresponding hotels with only those facilities should be returned. I can
2010 Aug 28
1
Alternative to merge_conditions in Rails 3
merge_conditions seems to be gone from rails 3. Is there something in Rails 3 or Arel that would allow me to achieve the same thing, which is to merge various types of conditions (array, hash, etc)? I haven''t spent much time with Arel, so I may be missing something obvious. Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Feb 11
2
Error when starting rails server [on rails 3]
Hi all, I receive an error when starting the server, namely: ~/Documents/blog$ rails server /usr/local/lib/site_ruby/1.8/rubygems.rb:827:in `report_activate_error'': RubyGem version error: rack-mount(0.5.0 not ~> 0.4.0) (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems.rb:261:in `activate'' from /usr/local/lib/site_ruby/1.8/rubygems.rb:296:in `activate''
2012 Aug 08
1
Memcache and Rails - Storing String as values.
Hello all, I have been using Memcache with my rails application to store certain key value pair.... I am using Dalli gem for the same... So Here''s what i do from console: require ''dalli'' dc = Dalli::Client.new(''remoteserver:11211'') dc.set(''example_link'', "http://www.google.com") => true value =
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by rating through radio buttons. It all works. However, my hotel model has_one :facility, this facility model is composed by several boolean fields (for example, roomservice:boolean restaurant:boolean and so on) The question is, I want to add checkbox fields for each facility I have and in the search form, when the user selects
2011 Feb 08
1
An acts_as_sortable replacement built for Rails 3
Howdy all, I just wanted to point out a new positioning library we open-sourced at Harvest: http://hrv.st/f03yfi And github: https://github.com/harvesthq/ranked-model A couple reasons this is a nice option for positioning: * ARel! From the ground up this library uses ARel so sorts can be chained like any order() statement. * Multiple rankers for a single model. * Group sorted
2010 Apr 23
3
rails-3.0.0.beta3 install error on ri 'lib' ENOENT
Hi, I was getting an odd error installing rails-3.0.0.beta3 on a fresh Ubuntu 10.04 install. The same exact error was occurring on my Ubuntu 9.10 install, so I''m sure it isn''t something specific to the Ubuntu version (nor beta for that matter). This is the error: mike@ubuntu:~/rubygems-1.3.6$ sudo gem1.9.1 install rails --pre Successfully installed activesupport-3.0.0.beta3
2010 Oct 11
8
Nooby Stuck - "has_and_belongs_to_many" relationship
trying to set up a "has_and_belongs_to_many" relationship would very much appreciate the help, not sure what im doing wrong at all. Scheme.rb class Scheme < ActiveRecord::Base validates :schemename, :presence => true belongs_to :user has_many :levels, :dependent => :destroy has_and_belongs_to_many :works end Work.rb class Work < ActiveRecord::Base
2012 Jan 03
1
Can Arel handle UPPER and LIKE condition?
Hello all, I''ve recently been on a project where somewhere needs using case insensitive search(using UPPER(name) LIKE '''') and LIKE condition, I want to use arel and don''t use the old style string concatenation, can arel handle this? But I check on arel documentation, doesn''t seems have any upper/like operator, and check on arel source, under
2010 May 20
5
Problem with installation of Rails 3
Help me out guys.... While installing rails 3 i got the following message :~$ sudo gem install rails --pre Successfully installed rails-3.0.0.beta3 1 gem installed Installing ri documentation for rails-3.0.0.beta3... File not found: lib My gem list :~$ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.0.beta3, 2.3.5) actionpack (3.0.0.beta3, 2.3.5) activemodel (3.0.0.beta3)
2012 Mar 13
2
[Arel]Building query, but can't get a proper output
I have the following code: advertisements_arel = Advertisement.order("advertisements.id DESC").arel @advertisements = (params[:website_id].present? ? advertisements_arel.where(:website_id => params[:website_id]) : advertisements_arel).to_a It returns a struct Arel::SelectManager::Row data But I''d like it to return an array of Advertisement objects (like it would
2010 Jun 20
0
ActiveRecord and ARel: correlated subqueries?
I''m trying to figure out how to use ActiveRecord in conjunction with ARel. In particular, I''d like to replace my residual literal SQL with ARel, if only I could see how. Let''s take Article with multiple Versions as an example. With ARel alone, I can find articles with their latest versions like this articles = Article.arel_table versions = Article.arel_table
2012 Jan 25
1
Scope in Rails model vaidation
Hi all, I have a requirement were the following is to be done: A user can belong to single chapter. Chapter has many channels.. So a particular user can only be a part of a single chapter. How can i do this validation in rails 3? -- 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
2010 Nov 16
6
rails 3.0.3 and visit_CoercibleString errors
From having no errors with 3.0.2 I now see lots of these errors when running my tests. undefined method `visit_CoercibleString'' for #<Arel::Visitors::MySQL: 0x000001074f4298> Anyone know what this is? -- 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
2010 Aug 05
3
how to ? Rails 3 ActiveRecord eager loading and AREL
Hello everyone, I would like to eager load scoped records to avoid queries executed in a loop (huge performance impact). The "scoped" part is what is giving me a hard time. I''m using Rails3 RC. Does anyone have any idea how I can do it? Here is a test case : we have an "Article" and a "Comment" Activerecord models, article has many comments comment
2010 Sep 27
0
problem with set_sequence_name please help
I''m building rails 3 with legacy oracle 10g db. which it''s sequence is non rails convension. I have try this. class AdCourt < ActiveRecord::Base set_sequence_name ''COURT_SEQ'' end with rails console : AdCourt.sequence_name I have got "COURT_SEQ" which look ok. When AdCourt.create!(:caption => ''AAAA'', :code =>
2012 Jul 25
3
rails scope without raw sql
Hi, I''ve been stung when deploying a rails app to heroku, and I''m fairly confident the problem is the difference between my local db sqlite3, and the heroku standard free shared db which is postgres(i think). I have a scope in my model that looks like this scope :not_archived, :conditions => [''application_state != "archived"''] The idea is I want
2011 Mar 07
0
A new, minimal Sphinx gem for Rails
Howdy all, I wanted to share this blog post we just published at Harvest: http://www.getharvest.com/blog/2011/03/thebes-a-new-minimal-sphinx-gem-for-rails/ If any of you are doing work involving clusters of Sphinx servers or with Sphinx under Rails 3, we think this gem is a pretty great fit. The approach is to use ERB templating to configure Sphinx instead of a DSL. You need to learn the