Questions tagged [railscasts]

Short Ruby on Rails screencasts containing tips, tricks and tutorials.

Every week Ryan Bates will host a new Railscasts episode featuring tips and tricks with Ruby on Rails. These screencasts are short and focus on one technique so you can quickly move on to applying it to your own project. The topics target the intermediate Rails developer, but beginners and experts will get something out of it as well.

http://railscasts.com/

275 questions
0
votes
1 answer

Railscast #228 Sortable Table Columns: doesn't change a direction

I followed Railscast's episode #228 to create a sortable table column in my app. My issue: when I press on the column name first time - it shows orders in ascending order. Next time I click - it doesn't automatically show records in descending…
Nadiya
  • 1,421
  • 4
  • 19
  • 34
0
votes
1 answer

undefined method error 'Public Activity Gem'

I have a simple rails app and i am trying to add an activity feed on it. For that i am using the Public Activity Gem and was following the this Railscast but now it's giving me an error: undefined method `shipment' for # My…
Ahmed Reza
  • 293
  • 1
  • 3
  • 19
0
votes
1 answer

undefined method `user_path' error while adding Public Activity Gem

I have a simple rails app and i am trying to add an activity feed on it. For that i am using the Public Activity Gem and was following the this Railscast but now it's giving me an error: undefined method `user_path' for…
Ahmed Reza
  • 293
  • 1
  • 3
  • 19
0
votes
1 answer

Why isn't the asset pipeline loading for Railscasts #196 (Nested Model Form)?

I downloaded the code for Railscasts 196 (Nested Model Form) from the GitHub depository, executed the bundle command and migrated the database. Pages are loading as expected, but none of the dynamic links ('remove', 'Add Answer' or 'Add Question')…
mcoomey
  • 121
  • 10
0
votes
1 answer

importing records from .csv file creates completely blank rows in database

All source code is hosted on my GitHub in the cloud_contacts repo. I am adapting Rails Cast #396 to work with Rails 4. I've got it working -sort of- and it will import a file full of test data. It will then create a record in the database for each…
user2993456
0
votes
1 answer

class `Csv` in RailsCst #396

Here is a link to the repo on github So in this RailsCast, Ryan uses a class named Csv (line 28 in store-after/app/models/product.rb). He is also using the roo gem. However, Csv is not a class in the API nor is it found anywhere in the rdoc for the…
user2993456
0
votes
1 answer

Code in Railscasts 111 -Advanced Search Form

In one particular Railcasts episode Ryan talks about advanced search and in that he uses some code so as to find the conditions for the search. As its working isn't explained I wanted some clarification regarding it. def products @products ||=…
Prateek
  • 429
  • 1
  • 7
  • 17
0
votes
1 answer

Ruby on Rails - Railscast #213 Calendar sort by datetime not date

I am building an app that involves a calendar. I found that the railscast for building a calendar although dated proved to be very helpful. I have everything up and running I am just trying to allow for the contents on each date to be organized by…
PilotLite
  • 11
  • 3
0
votes
2 answers

Using a Many-to-Many Relationship with the Public Activity gem in Rails

I have the scenario where an author has and belongs to many books, vice versa. Following the instructions for setting up associations in a one-to-many relationship works fine but when a many-to-many relationship introduced I get this error message…
0
votes
2 answers

Problem in Rail Casts Episode 190

After listening to Rails Cast No 190 I sat down to try it So I installed nokogiri with gem install nokogiri on my Windows 7 Ultimate laptop. I use Ruby 1.9 and this is the way i Installed Nokogiri C:\Ruby>gem install nokogiri Successfully…
gkolan
  • 1,571
  • 2
  • 20
  • 37
0
votes
1 answer

Hartl Tutorial + Omniauth: Log In not Logging In

I tried integrating omniauth with Hartl tutorial user signup authentication. I thought about switching the hartl tutorial authentication to Devise and then Devise to omniauth (since their is a Railscast episode for that), but I'm worried the switch…
AnthonyGalli.com
  • 2,796
  • 5
  • 31
  • 80
0
votes
1 answer

How to Create a Route for Tags?

I'm using the gem acts-as-taggable-on to create tags for goals and valuations (aka values). To start I directed the route to this: get 'tags/:tag', to: 'valuations#index', as: :tag But now I want to add tagging to goals as well. How do I change the…
AnthonyGalli.com
  • 2,796
  • 5
  • 31
  • 80
0
votes
1 answer

Calling a class method through an object instance

Railscasts #4 uses this sample code: class Task < ActiveRecord::Base belongs_to :project def self.find_incomplete find_all_by_complete(:false, :order => "created_at DESC") end end class ProjectsController < ApplicationController def…
hattenn
  • 4,371
  • 9
  • 41
  • 80
0
votes
1 answer

Rail authentication from scratch password confirmation isn't working

I'm following along Railscasts #250 Authentication from Scratch but have an issue where the Password Confirmation can be different from the Password and the user will still be created. ..model/dealer.rb: class Dealer <…
Ryan
  • 699
  • 4
  • 13
  • 30
0
votes
1 answer

Full text search not working completely on rails 4 PG 9.3

I have a problem with search on PG. I have a table with two columns first name and last name. I want someone to be able to search for one person using their first name, their last name, or the full name. I was following the Railscast #343 on full…