Tagged Questions
Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.
0
votes
0answers
9 views
Rails-2 How to write test case for before_filter in Application controller
I have a Rails-2.3.10, The application just works fine. we have one error in our application.
The Error scenario is :
Some times a user directly trying to accessing the application page without ...
0
votes
0answers
9 views
Display 2 attributes in jQuery TokenInput text field
I have been following Railscasts episodes #258 & #382 to create a tag model which uses jQuery TokenInput to dynamically populate the question tags textfield so a user can create or add tags.
...
0
votes
1answer
11 views
how to see what attribute is giving me this error: value too long for type character varying(255)
I'm trying to deploy my rails app with heroku. I ran heroku run rake db:migrate and that worked fine. Then I tried running heroku run rake db:seed and I got this error: value too long for type ...
0
votes
0answers
19 views
Ruby “We're sorry, but something went wrong.” — No errors in logfile
I just deployed my ruby app on my new virtual linode server
The app worked fine on my own computer, but it won't run on the new server, it just gives me the error "We're sorry, but something went ...
0
votes
1answer
17 views
Updating avatar on Ruby on Rails with paperclip
I've looked around and I cannot figure out why this is working. I allow users to sign up, without needing them to upload avatars at first. However, if they wish, they can upload avatars after signing ...
1
vote
2answers
23 views
Add an array of records at the beginning of another array of records
Let's say I got two array of database's records.
I'd like to add the second one at the beginning of the first one.
I've look into insert (at a spefic index), but it would result in inserting the ...
0
votes
1answer
16 views
Didactic/complete non blog/cms rails tutorials
I've known ruby for a while, but never used rails seriously until one month ago, currently I am a PHP developer, but got a rails job that will start soon and want to get up to speed as much as I can ...
0
votes
1answer
16 views
Rspec case for rails 4 patch :update
I am using Devise in my app, and trying to write a spec for updating email ID. The UI works, but the spec is failing. I am reloading the user object as well, before testing against changed email ID.
...
0
votes
1answer
12 views
Rails: Optimizing queries to database for has_many relationship
In my User model:
class User < ActiveRecord::Base
has_many :received_messages
:foreign_key => 'recipient_id
end
In the index action of my messages controller, I ...
0
votes
1answer
13 views
my app break after updating rubygems and bundler
i had an application created with rubygems package manager 1.8.24 and bundler 1.2.4, today i update my rubygems and bundler to the latest verstion with these commands :
gem update --system
and
gem ...
1
vote
1answer
19 views
Rails: Submit button outside form_tag
I'm using a button to perform processing in a group of selected check-boxes. The solution is based on RailsCast #165.
It's all working fine, but only if the submit_tag button is contained within the ...
1
vote
1answer
13 views
How do I use threads to write to my database?
I'm using the thread pool discussed in https://github.com/meh/ruby-thread to spawn multiple downloaders.
I'm trying to download the contents of many RSS feeds, nearly 200K feeds in total, but I'm ...
0
votes
0answers
9 views
Analogue of 'workless' gem for Web Dynos on Heroku
I've recently found an awesome gem "workless", which allows to scale workers automatically and switch them off when they are not in usage. This is really nice, and have already saved me a lot of ...
0
votes
0answers
21 views
Parent fields are all nil when accessed by child (embedded 1-n)
I have a 1-n relationship defined as follows:
class User
field :email, type: String
embeds_many :papers
end
class Paper
embedded_in :user
end
If I try and access the parent fields (user) ...
0
votes
0answers
11 views
HABTM works from console but not from app
I can create HABTM from console but not from app. I think I can assume my HABTM setup in my models/DB is correct because this works:
Location.create(name: "test10", longitude: "1.0", latitude: ...