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

syntax error, unexpected ':', expecting ')' in Stripe form using Rails 3

I'm following Ryan Bates' RailsCast #288 "Billing with Stripe" and when I modify my form to include the credit card info I get the following error: compile error /Programs/domainster/app/views/domains/_form.html.erb:23: syntax error, unexpected ':',…
vich
  • 11,836
  • 13
  • 49
  • 66
0
votes
1 answer

Need help with implementing Railscast 198 in Rails 3

I have been trying to implement Ryan Bates Railscast 198 into rails 3 for like 4 days... at least at night if you know what I mean. Anyway, here is the code I have right now: User controller actions (Devise setup to show the different states of…
TJ Sherrill
  • 2,465
  • 7
  • 50
  • 88
0
votes
2 answers

Rails HABTM checkboxes don't save to database

I am beginning Rails programming and all I want to accomplish is to have a list of check boxes from which I can choose the corresponding categories for a product. I have followed the railscast on this matter, but it doesn't seem to work for me. I…
0
votes
1 answer

How to implement simple search form to be used in conjunction with paginate?

I am following Ryan Bates' railcasts: http://railscasts.com/episodes/37-simple-search-form in solving my issue with the search results on a page with will-paginate. Here he answers the question as to how to solve this problem. However, I've tried…
Tony
  • 981
  • 5
  • 16
  • 30
0
votes
1 answer

NoMethodError - undefined method in routes following Railscast 145

I'm using Rails 3.1 and following this railscast to implement active merchant, I'm trying to copy the shopping cart used in the episode but am getting this error: NoMethodError undefined method `current_cart' for # Rails.root: …
Dave
  • 1,175
  • 2
  • 21
  • 49
0
votes
1 answer

ROR 3 : Event Calendar

I am new to rails and i need some help working with calendar I generated a scaffold: rails g scaffold abc event_name:string event_date:date content:string Now i can create events for a particular date and give some description. I looked at Ryan…
Wasi
  • 1,258
  • 4
  • 14
  • 33
0
votes
3 answers

OmniAuth for facebook

I am trying to use this railscast episode to provide authentication via twitter http://railscasts.com/episodes/235-omniauth-part-1 I'm wondering whether it is possible to use omni auth to login with facebook as well? Also, I wanted to use the HTML…
yogashi
  • 273
  • 1
  • 5
  • 11
0
votes
1 answer

How to limit nested form fields using jquery not working

i am following Ryan Bates episode on nested form fields and have added the bit of jquery suggested at the end of part 2. Everything works well(i am able to add fields and remove fields). i now want to limit the number of fields you can add in the…
Hishalv
  • 3,052
  • 3
  • 29
  • 52
0
votes
1 answer

Railscast #238 jquery token input - My json request is going to the wrong controller

Hi I'm trying to implement jquery token input according to railscasts #258 http://railscasts.com/episodes/258-token-fields Where the railscasts uses 'author' I am using 'artist' When I start typing in the artist_token field my json search request is…
trying_hal9000
  • 4,343
  • 8
  • 43
  • 62
0
votes
1 answer

Is there an 'updated Railscast episode source code' site?

I've searched for railscast 198 updated to rails 3, I can find some snippets here and there but can't find anything for the full source code.. hey it's worth a search; I'm a noob and don't know all the changes that transitioning rails 2 to rails 3…
thejonster
  • 156
  • 2
  • 10
0
votes
2 answers

Rails 3: updating user attributes when authentications are created

I followed Railscasts #235 and #236 to setup creating user authentications with omniauth. http://railscasts.com/episodes/235-omniauth-part-1 http://railscasts.com/episodes/236-omniauth-part-2 I have a 2 boolean attributes on the user model called…
trying_hal9000
  • 4,343
  • 8
  • 43
  • 62
0
votes
1 answer

Rails 3: Railscast #167 virtual attribute for creating tags - @user.tags

I would like to a tagging system where I can separate the tags by the user's who created them. I followed Railscast #167 about setting up tags using virtual attributes, but that way only lets me call @post.tags to find the tags for a post, but I…
0
votes
2 answers

Mongoid Syntax Question

In episode 189 of Railscasts, there is a named scope in the User model which is as follows: field :roles_mask, :type => Integer ROLES = %w[admin moderator author] named_scope :with_role, lambda { |role| {:conditions => "roles_mask &…
Miro
  • 115
  • 7
0
votes
2 answers

Rails 3 -- Build not saving to database (Railscast 196)

I'm following along with railscast 196. I've got two levels of associations. App -> Form -> Question. This is the new action in the form controller. def new @app = App.find(params[:app_id]) @form = Form.new 3.times {@form.questions.build…
Msencenb
  • 5,675
  • 11
  • 52
  • 84
0
votes
1 answer

has_many :through not giving access to _id from base

Model code class Location < ActiveRecord::Base attr_accessible :day_tokens, :name, :address, :phone has_many :locavailability has_many :dayavailables, :through => :locavailability attr_reader :day_tokens def day_tokens=(ids) …
Omnipresent
  • 29,434
  • 47
  • 142
  • 186