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
3 views
ActiveRecord model for mutually equal relationships
I'm trying to understand the best way to model mutually equal relationships: like enemies or competitors using Active Record. If possible I would like to avoid storing them redundantly. For example, ...
0
votes
0answers
5 views
Rails 3 :remote => true Breaks form functionality
I am trying to turn a form I have into an AJAX request so that it will submit the form w/o having to reload the page, I thought that adding ':remote => true' would solve thise but it seems to break ...
0
votes
0answers
5 views
Spree - Deface - Edit Product - Giving Error
I am working on my eCommerce site and have selected Spree (Ruby on Rails) although I am converged with PHP and .NET. It has been so far fascinating out of the box and yesterday I was interested in ...
-1
votes
0answers
13 views
RVM ruby installation fails
I've got an ruby error I can't manage to fix. To be short ruby isn't working as it should. When I try to reinstall it with
rvm reinstall all --force
I get errors in the terminal, saying I should ...
0
votes
0answers
8 views
request not entering into the controller action
i have been trying this from long time but not getting what is the mistake that i am doing,
here is my controller
class UsersController < ApplicationController
puts "before"
def create
puts ...
0
votes
0answers
4 views
Jquery DataTables Column Sort in Rails
I've read all the posts about using DataTables and everything makes sense--however I still can't solve the problem so I'm posting here.
I'm working on someone else's Rails app, and they have ...
0
votes
0answers
3 views
LoadError causing Server not to start
Can anybody explain this for me?
$ rails s
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
...
0
votes
1answer
5 views
Why does activeadmin show empty in the fields?
I am doing a site using activeadmin. I have set up all the necessary fields up and set the form up with paperclip set up. My fields work for other resources and my model for the resource is set up.
...
1
vote
2answers
11 views
Rails 4 - Customizing (json) format of response objects in Rails
I have a Rails Controller who responds with JSON objects. Let's take this theoretical example :
respond_to :json
def index
respond_with Comment.all
end
This would respond with something like
...
0
votes
1answer
7 views
how to point to my rails application to my domain name
I'am using Phusion-passenger and nginx to deploy my rails application, when i goto my server IP-Address i am able to access my rails application, but i cant access it when i go to the domain name. my ...
0
votes
4answers
27 views
How can I lessen the verbosity of my populate method?
I wrote a form object to populate an Order, Billing, and Shipping Address objects. The populate method looks pretty verbose. Since the form fields don't correspond to Address attributes directly, I'm ...
0
votes
0answers
10 views
Populating a self join table in Rails 4
I have a product table and a related product table, related works one way:
Product(id: int, name: string)
RelatedProduct(id: int, product1: int, product2: int)
With the following models:
class ...
0
votes
1answer
16 views
Encoding only spaces and commas in URL
I am trying to encode a url in rails for an image attachment, but using CGI::escape or URI.escape seems to encode everything. I just need the commas and spaces encoded, nothing else. How would I go ...
0
votes
0answers
11 views
Paperclip's :style => { :original => '50x50' } still saving original size
I'm trying to prevent Paperclip from saving the original image. Everywhere I search people recommend using has_attached_file :image, styles: { original: "50x50>" }. But when I do I get 2 images on ...
0
votes
1answer
16 views
Ruby on Rails - images not loading on Firefox and Chrome but load correctly on Safari
I have tried so many alternatives to fix this and now I am not sure what else to do.
I am using ruby 1.9.3p362 (2012-12-25 revision 38607) and Rails 3.2.8
My homepage looks fine on Safari, but there ...