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
2
votes
2 answers

Rails Beta invitations - Overriding Devise Registration Controller

I use Devise (1.4.8) for my User model and have been trying to implement a simple beta invitation feature (Rails 3.0.7), following Ryan Bates's railscast. I can't get the [new] method of my devise model's controller to recognize the invitation…
2
votes
2 answers

Display Different Text When Logged In in Rails

I have been following the Railscast #270 found Rails Cast #270 about implementing Authentication in Rails 3.1. What I would like to do is have the ability in my templates to have different links displayed if a user is logged in. It should look…
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
2
votes
1 answer

Dynamically adding child field on form as described in Railscast 197 does not use :child_index parameter to generate html name attribute

I have an application where I am trying to add records as shown in the Railscast number 197. My objects are more simple, as I only have one level of Parent/child relationships: Patients and events. The code works fine for removing a child record…
2
votes
1 answer

Rails 3 - Help! Subdomains - Users Cannot Logout?

I've followed the ascii cast up at http://asciicasts.com/episodes/221-subdomains-in-rails-3 I've set the :domain option to :all in session store: Rails.application.config.session_store :cookie_store, :key => '_bloggit_session', :domain => :all Now…
stringo0
  • 2,720
  • 7
  • 38
  • 52
2
votes
1 answer

How to do complex forms with jQuery instead of RJS

In episode 74 of railscasts ryan shows how to achieve complex forms with RJS: http://railscasts.com/episodes/74-complex-forms-part-2 The trick is to create a partial and link_to the partial using RJS. The episode is quite old and at that time…
Mike
  • 1,361
  • 2
  • 13
  • 13
2
votes
2 answers

heroku & devise user sign up registration controller error

I just switched to Devise/Omniauth combo and everything is working properly on my localhost server. However when I uploaded to heroku the app crashes when the user clicks sign up on the traditional sign up form (not omniauth login). I am using…
John
  • 4,362
  • 5
  • 32
  • 50
2
votes
2 answers

Paypal Express ActiveMerchant integration

I am following Ryan Bates' railcast 146 and it is really helpful. However, Im trying to remove the cart object from the process, and just process an order individually. The problem I am having is how to establish the amount which is used twice:…
Dave G
  • 4,376
  • 4
  • 25
  • 28
2
votes
0 answers

OpenSSL pkcs7 add signer error in Rails 5, working through PayPal Security RailsCast

I have been setting up a shopping cart and checkout by working through the series of RailsCasts(#141-143) and am pretty new to using OpenSSL and pkcs7. Everything has been working perfectly up until implementing security measures in (episode 143:…
2
votes
0 answers

Rails Calendar Helper: New Calendar Instance For Each User

I'm trying to build a staff rostering/scheduling app in Rails 5. The idea is for each staff member to have a user account where they can log in to enter the days they are available for work, then for the boss to book shifts based on availability. A…
2
votes
1 answer

How to use public activity gem as notification system?

although i had asked this question before but didn't get any useful answer what am trying to do is to use public activity gem to build a notification system i followed this railscast and everything worked just fine. I have a article and a comment…
2
votes
2 answers

What is "<<-" in code?

This bit of code is taken from Ryan Bates' Railscast episode 343 on full-text search in PostgreSQL. I would like to understand it, but I can't find anything on the <<- operator (if it even is an operator). Can someone please point me to somewhere I…
Bazley
  • 2,699
  • 5
  • 36
  • 61
2
votes
1 answer

How to delete id from params after destroy?

I made sortable colums by RailsCast #228 Sortable Table Columns Everything well work. But when I add destroy record via ajax sort links doesn't work after delete application_helper.rb #application_helper.rb def sortable(column, title = nil) title…
2
votes
2 answers

Railscasts #241 NoMethodError undefined method `[]' for nil:NilClass

There is a NoMethodError in SessionsController#create. The twitter authentication page occurs but the callback URL is not working. The page is not being rendered to the website after twitter authentication. Here is the code in different files. In…
Sakshi Jain
  • 410
  • 5
  • 21
2
votes
0 answers

Nested Forms error on unknown attribute Id in Rails 3

I'm attempting the nested forms based on Ryan Bates' #196 Railscasts Nested Forms 1. I'm using Nested_form and Simple_form gems. Maybe code is competing with gems? The error that won't seem to go away is ActiveRecord::UnknownAttributeError at …
2
votes
1 answer

Rails cast #196 / #197 nested model generation

Hi I've gone though Railscast 196 & 197 and got everything working, however I have a question about extending the functionality. At the end of Railscast 196 & 197 (http://railscasts.com/episodes/197-nested-model-form-part-2) Ryan adds a question…
Eric Norcross
  • 4,177
  • 4
  • 28
  • 53