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.
1
vote
1answer
5 views
Mass assignment error using acts_as_commentable_with_threading
I've been following this tutorial to implement threaded comments with the acts_as_commentable_with_threading gem. However, I seem to be running into a mass assignment error that seems to stem from the ...
0
votes
0answers
5 views
uninitialized constant error with namespace in controller route
I have the following route
resources :reports
and it currently in path /reports
I want this to be in admin/reports
I have
namespace :admin do
get ..
post ..
end
If I do
namespace ...
1
vote
2answers
17 views
ImageMagick Install Windows
I am trying to install ImageMagick on Windows. What I did is install Windows RailsInstaller created my version and now I need to use ImageMagick but for some reason it doesn't work.
I took the binary ...
1
vote
2answers
15 views
Rails order by results count of has_many association
Is there anyway I can order the results (ASC/DESC) by number of items returned from the child model. (Jobs), Thanks for you help.
@featured_companies = ...
0
votes
1answer
33 views
rails joins models confusion
Here is my three models/tables
class Swimming::Classschedule < ActiveRecord::Base
belongs_to :swimming_classtimes ,:class_name=>'Swimming::Classtime',:foreign_key => "classtime_id"
...
1
vote
0answers
16 views
Hybrid Model/Controller Validation?
I am looking to have a user enter in a URL to an image on a form. I already have this built. I would like for two different things to happen, but I was wondering if I could somehow combine them.
When ...
0
votes
1answer
12 views
gem install rails doesn't work due to openssl/ETimedout in windows
Initially, I have ruby 1.9.3 version installed in my windows 7 and i have installed ruby 2.0.0p195 recently and have tested from command promot (ruby -v; ruby -e "puts 100"; irb )works pretty well.
...
0
votes
1answer
9 views
SOS:: Hosted Google Reader Alternative project down on Heroku with timeout H12.
We have built an open-source, free Google Reader Alternative and have live users using the platform. It is hosted at http://reader.pykih.com and code is at http://github.com/pykih/reader
Until, last ...
0
votes
0answers
12 views
Select Articles that aren't tagged with any tag in this array
This will be an easy one for any activerecord mavens - though I don't seem to be able to get a working query myself!
I have Articles which have_many Tags through: a Taggings join table.
class ...
0
votes
2answers
18 views
Give form a CSS class using simple_form_for
Here's what I've tried, and the simple_form_for call ignored my class setting.
# Rails code in view:
<%= simple_form_for @admin_artist, :class => 'foobarbaz' do |f| %>
# Renders:
<form ...
0
votes
2answers
14 views
Parsing JSON datetime?
I am consuming a JSON API that returns datetime values as a string in the following format:
/Date(1370651105153)/
How can I parse a value like this into a datetime variable in rails?
0
votes
1answer
11 views
Basic nested resources
I am nesting resources like so:
resources :users do
resources :tags
end
And in my tags index page, I want to link to the single tag page, so I am doing like:
<%= link_to 'Show', ...
0
votes
0answers
20 views
Rails my .destroy leads back to create form page with error messages
I am building an app that has a create product page. So naturally I just added the functionality to remove a product. But when I attempt to delete the product I get sent to a blank create product page ...
1
vote
1answer
22 views
Error Call a Method of Model in Controller
Hello im try call a method of my model from my controller, but when try the instance get this error:
NoMethodError (undefined method `products=' for #<Class:0x114bc4c50>):
...
0
votes
1answer
15 views
Invalid multibyte character (US-ASCII) error
I am writing a test using ruby where I am verifying some data as per below code.
array['myLabel'].should eq '(100–200) mg/dL'
When I run the test, I am getting an error on this line.
Error is: ...