Ruby on Rails is an open-source web development framework written in Ruby. Ruby on Rails follows the principle of convention over configuration, freeing you from having to re-invent things to stay productive. Ruby on Rails 4.0 is the latest edge version available.
0
votes
0answers
21 views
Sum returning null
I am having a problem with a Ruby SQL look up function: it always returns a null.
Here is the terminal output:
SELECT COUNT("point_store_items"."point_cost")
FROM "point_store_items"
INNER JOIN ...
0
votes
3answers
17 views
Can't deploy to heroku [heroku log included]
I'm having trouble deploying to Heroku, I've installed postgresql but I don't think I've configured it properly. This may or may not be the problem, but I have a hunch it has something to do with it. ...
2
votes
1answer
10 views
Rails: before_destroy not updating parent
In my rails app, I have a Donation model, which has an attribute called status (an integer) and a child model called Delivery. A donation has_one delivery.
In the delivery model, I have callbacks
...
1
vote
0answers
9 views
No Mass assignment with attr_accessible set in model Rails 3.2.2
I have am creating a twitter style following relationship between users in my Rails 3.2.2 application. I have User and Relationship models.
class Relationship < ActiveRecord::Base
belongs_to ...
1
vote
0answers
8 views
Saving Tweets For Current User / Authorized User into Database
I'm working on a small project and I'm a little stuck. I've follow a few tutorials online to get things moving and here is what I came up with. Everything works when it comes to authenticating with ...
0
votes
0answers
12 views
Update another table with the newly created foreign key
Could somebody advise what code should be added in order to ensure that the created new id for a one table will be updated in the table from where the ID is used ( the id from table Appointments has ...
0
votes
0answers
11 views
Endless/infinite scroll won't load (Railscast 114 revised)
I'm trying to implement the endless page functionality demonstrated in Ryan's Railscasts episode #114 revised. The will_pagination functionality works great. However, once I try to implement the ...
1
vote
0answers
8 views
acts_as_votable one-to-many and only one option votable
I'm trying to figure out how I can work with the acts_as_votable gem to implement a voting system with a one-to-many relationship. I have the AgendaItem model, which has-many Conclusion items. ...
0
votes
1answer
11 views
Should I be using Feedzirra in the model?
I'm playing about with the Ruby Feedzirra gem and have managed to acheive what I set out to do by using it in the controller.
Though everything I've seen has mentioned using it in the model. I was ...
0
votes
1answer
11 views
Rails, CKEditor, PostgreSQL, image upload with Carrierwave
When I try to insert an image into my blog I select the Upload tag and select my file and Send it to Server. Then at the URL tab I select Browse Server and I get the following error:
...
0
votes
0answers
10 views
Google Oauth and Invalid Credentials
For the past week or two we've had issues signing users via Google Oauth. The user when redirected to Google if already logged in via Gmail is redirected back to our site with the following url.
...
1
vote
0answers
22 views
Saving new records based on older instances in Rails
I have a Lesson model and a Revision model. When a lesson is created its first revision is created. Users should be able to create new revisions by updating the old one - but the updates would save to ...
0
votes
1answer
12 views
Feedback association between two rails models
I have two models - Customer and Contractors. I have setup a simple app, where they interact on an activity. Now at the end of it, I would like for them to leave each other feedbacks. Nothing complex ...
0
votes
0answers
5 views
Monkey patching a Gem method in Rails 3
I'm willing to use friendly_id gem with Firebird, but I need to override a method that implements a specific SQL function with code related to Firebird.
I've created the file ...
0
votes
0answers
5 views
SQLException on db:test:load with Rails
I've been working on a small but somewhat complex Rails application with multiple has_and_belongs_to_many relationships. It's open source, and the code is here. Everything was working fine, but ...