I'm trying to find some api docs like
http://api.rubyonrails.com
but for the latest rails 3 release candidate.
Is there an online version of them? Or is there a way to build the docs (using rake doc:rails) to make them look the same?
...
How would you stub Devise in Rails 3 with rSpec. I have a UsersController and a User model. Both of which are associated with Devise at the moment, I'm writing controller specs and I really am having a hard time with my expectations as the Devise sign_in is really jamming up the works.
Any thing will help.
...
I've been upgrading Rails2 app to Rails3, running specs and got this error:
CommentsController destroy action renders back :success => true if comment is deleted
Failure/Error: comment = Factory.create(:comment, :commentable => @question)
undefined method `update_counters_without_lock' for #<Class:0x7f178ffe5850>
I checked Rails3 API ...
Hello,
I'm starting a new rails 3 application, and I want it to be tested the better I can.
This application is eavily based on plugins (wich will become gems later).
One of this gem will be a proxy which talk with an API and outputs formatted data.
Few plugins will process data sent by this proxy
My questions :
Should I use cucum...
I want to learn Ruby on Rails. I've done some work with various java frameworks but I can no longer ignore everyone RoR craze. I did some looking around and found that a lot of people recommend Agile Web Development with Rails as a good starting point. Would you agree? I was looking on the site for it (http://pragprog.com/titles/rail...
Hi! I'm new to Rails and I'm trying to learn it using Rails 3 (RC).
I have managed to use http://plist.rubyforge.org/ for supporting the output of plists. I would like to check with you guys to see if my approach is the right way to do it. Here goes:
In the gemfile I added gem 'plist'
In config/initializers/mime_types.rb I added Mime:...
I've followed all of the steps that I've been able to find online for configuring Rails 3 with Rspec 2 and Mocha. In my Gemfile:
group :development do
gem 'rails3-generators'
gem "rspec", '>= 2.0.0.beta.19'
gem "rspec-rails", '>= 2.0.0.beta.19'
end
group :test do
gem "faker"
gem "rspec", '>= 2.0.0.beta.19'
gem "rspec-rails"...
Is it possible to use concurrent databases in one rails application?
With AR I can use establish_connection method inside a model. Is it possible with datamapper?
...
I've got a simple model object:
class UserRating
include MongoMapper::EmbeddedDocument
key :idea_id, ObjectId
key :rating, Integer
end
I'm trying to set an Idea_Id on this object with:
user_rating.idea_id = ObjectId.new
This throws: "illegal ObjectID format"
This sure seems like simple code... The only oddity I am noticing ...
In Rails3 there seems to be a problem when chaining two scopes (ActiveRelations) that each have a different include:
Consider these two scopes, both of which work fine on their own:
First scope:
scope :global_only, lambda { |user|
includes(:country)
.where("countries.area_id <> ?", user.area) }
Work.global_only(user) => (cut list of...
I have a User model which has_many Documents. Each Document's title must be unique within the scope of a User. This works as expected.
class Document < ActiveRecord::Base
has_many :documents, :dependent => :delete_all
end
class Document < ActiveRecord::Base
belongs_to :user
validates_presence_of :title
validates_uniqueness_of...
Dears,
i'm looking for implement in my application to have database for the main entity of the system.
i'd like to create and set a database for this entity named with a property value.
Like : For a CMS Project, to create a couchdb database for every Site.
kindly, as that is based on Rest and Rails :
in the create method i have the ...
Using Ruby on Rails 3.0, I would like to have pages where posts have side-by-side translations. For example, a page would look like this
+---------------+---------------+-----------------+
| Hello | Hola | Bonjour |
+---------------+---------------+-----------------+ ... (there could be many more languages)
| He...
Rails 3 provides a deep_merge method on a Hash. What should I do to use the deep_merge method defined in a gem I installed instead? Wherever I require the gem, the deep_merge method from Rails is used.
(The deep_merge gem installation page: http://trac.misuse.org/science/wiki/DeepMerge)
The deep_merge gem module structure:
module De...
I'm working on a plugin for Rails3. I'd like to allow users to override some settings. At the moment I'm doing this inside my plugin's Rails::Engine class like:
config.my_setting = :default_value unless config.respond_to? :my_setting
This seems like the wrong way to handle this. Is there a better method or convention most plugins use ...
Configured vim and gvim on Windows, as well as vim and macvim on OSX. Intend to learn rails 3, so installed rails 3 rc on both OS'ses. So far, so good.
When using macvim, each and every script execution offered by rails.vim gives me errors "Uninitialized constant Bundler (NameError)". Tried :Rserver, :Rgenerate, .... However, staying on...
According to their blog (http://weblog.rubyonrails.org/2010/7/26/rails-3-0-release-candidate), the release candidate for Rails 3.0 is out now, and the formal version will be coming in 'a few weeks'. I've been planning to rebuild my application using MongoDB anyway, should I go ahead with Rails 3.0.0.rc right now or wait for the formal ve...
Hi,
I'm having issues when running the default tests in Rails3 beta4 with Cancan (http://github.com/ryanb/cancan). The tests are the plain vanilla auto-generated ones that look like
test "the truth" do
assert true
end
Every single test (both unit and functional) yields the following error :
ActiveRecord::StatementInvalid: SQLite3::...
After reading up on a few experiences, I feel this issue might need to be brought up again. Coding in Rails3, I'm trying to implement some smooth Ajax effects when a user tries to create a post on another element of my app. Here's the code I'm concerned with:
app/views/posts/new.html.haml
- form_for @post, :remote=>true do |f|
= ...
I have a rails3 project where I need to use prototype together with jquery - using the current Ruby on Rails 3 RC1 there is no example or documentation to use both together without problems.
Is there a setup instruction or did anyone get both javascript frameworks running with the latest rails version?
thanks,
z3cko
...