0
votes
0answers
7 views
Ordering by number of associations in common (Rails)
BACKGROUND: I have Posts and Users, and both have many Communities.
OBJECTIVE: For any given User I'd like to return a collection of Posts, ordered by how many communities the post has in common with ...
0
votes
0answers
5 views
Nested attributes with products variant and its options
I have a model product, Product has many ProductVariants and PV belongs to Product. I'm using nested attributes to be able to display a form to add variants in the product new form. It works fine for ...
0
votes
0answers
6 views
Building a slideshow of images,pdfs,videos for my rails app
I am trying to make a slideshow of images, pdfs and videos for my rails app
Would using AngularJs be the way to do this?
If so, how would i go about doing this?
If not, what should i use and how ...
0
votes
0answers
10 views
Rails jquery sortable list not saving
Sorting the list with javascript works fine, however when I refresh the page, the sorted list returns to its original position rather than saving. Looks like the POST request does not seem to be ...
0
votes
1answer
6 views
Rspec Tests fail using custom model validation
I have this custom validation method which makes sure you can't vote on your own content, and it causes quite a few RSpec test to fail with undefined method 'user_id' for nil:NilClass
Is there a way ...
0
votes
1answer
21 views
Rails Ajax Form to add new associated record
I have an events form that has a select drop down for venues. Currently if a new venue is to be added for an event users have to navigate away to the venue form, create their venue and then navigate ...
1
vote
4answers
26 views
Rails, is it possible to change the css depending on the value of an model column?
Lets say i have a table like this:
I want to style the rows of the table dependent on the the type {id1: 'Anamnse', id2: 'Befund', id3: 'Therapie'}. Manually i would simply add the bootstrap classes
...
0
votes
0answers
20 views
Ruby on Rails 3.0 to RoR 4.0 Unit Test
I am upgrading an application from RoR 3.0 to RoR 4.0 and I am running into a problem where all the fixture yamls are inserted into the database before the unit test gets executed.
One of my test ...
3
votes
1answer
32 views
Image tag shows all columns of model
Yesterday i made some experience with carrierwav, all works fine but at the image tag where normally only the image should displayed rails also shows the hole model, with created_at etc. Here you cann ...
3
votes
1answer
42 views
Deleted user attempts to login
When I'm testing my rails app and I delete a user and try to login I get. Couldn't find user with auth_token = " ... ". Okay, I guess I create a cookie with an auth_token for the user which no longer ...
1
vote
1answer
24 views
Assigning multiple attributes with radio buttons
Im building a plugin to spree, that i need in my application. We are using a shipping company that doesn't deliver to private adresses but to some parcel shops around the country. So when the user ...
2
votes
0answers
18 views
Rubber and Amazon EC2 hosting issue (Net::SSH::AuthenticationFailed: root)
I want to host my ruby on rails application on Amazon EC2 server. I am following Rubber and Amazon EC2 railcast on Ubuntu. When I execute cap rubber:create_staging command, its showing error something ...
0
votes
1answer
27 views
Rspec test failing for POST member route
I have a polymorphic vote model which POSTs through a member route on its parent models. Each parent has a "Vote" method in the controller and im trying to test this action in my controller tests. ...
0
votes
0answers
16 views
preventing /account.1111 routes in rails application?
I am able to enter /account.111 or /profile.111 in my URL's.
Is it possible to prevent these routes to be accepted by a rails application?
0
votes
1answer
17 views
Foreign character issue with CSV import to Heroku Postgres DB
I have a rails app where my users can manually set up products via a web form. This works fine and accepts foreign characters well, words like 'Svölk' for example.
I now have a need to bulk import ...