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

Group posts by Year - Rails

I have model called "Shoes" that belongs to the a model called "History". I want to show all of the shoes in my History show.html.erb page, but I want to group them by their release date. (I have an attribute called release for that). I'm using this…
ChrisBedoya
  • 737
  • 2
  • 15
  • 28
0
votes
1 answer

Railscast #223: fetching data from database

Railscast #223 At 6:30 in this RailsCast it mentions real data is going to be used instead of arbitrary data. The line in the /app/views/orders/index.html.erb file data: [1, 2, 5, 7, 3] is replaced with data: <%=…
LogiKal
  • 49
  • 3
  • 12
0
votes
0 answers

getting a 404 when I try to render partial via jquery

Help with this would be much appreciated. I am following along with railscasts episode 381 (http://railscasts.com/episodes/381-jquery-file-upload). I want to be able to upload multiple images. I am using the carrierwave gem. I'm a little unclear on…
bonum_cete
  • 4,730
  • 6
  • 32
  • 56
0
votes
1 answer

find by all by an Id, but exclude certain Ids

I am going over Public Activity Gem Railscast Vid. (http://railscasts.com/episodes/406-public-activity) Everything works fine, but I would like to be able to find all given activities performed except those that contain a recipient_id that belongs…
Serge Pedroza
  • 2,160
  • 3
  • 28
  • 41
0
votes
1 answer

Trying to understand Railscast episode 197 (related to previous post: #17094200)

I am trying to make this work for my page, but I need to understand the regular expression replacement. Can someone break this down for me? function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp =…
0
votes
1 answer

Ruby on Rails: railscasts comment system: inserting username into comment database?

I was following RyanB's polymorphic association video which shows examples of implementing a comment system. http://railscasts.com/episodes/154-polymorphic-association-revised?autoplay=true I was wondering how do I add a username into the database…
hellomello
  • 8,219
  • 39
  • 151
  • 297
0
votes
1 answer

CarrierWave remote upload from model not controller

I'm working on a Rails app which consumes the Instagram API to get a set of pictures. I want to store those pictures locally using CarrierWave to remote upload them. I know if you're using a controller, you can supply a url as the remote_image_url…
wkdshot
  • 256
  • 1
  • 6
  • 18
0
votes
1 answer

Rails - "include CarrierWave::RMagick" results in: undefined method `model_name' for NilClass:Class

I'm building a simple app with standard User model that has_one Profile model. I would like the profiles table to have a column for an image attribute. Therefore, I followed RailsCast #253 titled CarrierWave File Uploads. All is going well until…
mattq
  • 89
  • 10
0
votes
1 answer

jquery append or replace based on call from rails?

I've been following several railscasts and currently have a product list with endless page using will_paginate. I want to implement railscast #240 to add a live search into the results, but there seems to be some logical conflicts I'm not sure how…
tehfailsafe
  • 3,283
  • 3
  • 21
  • 27
0
votes
0 answers

rails model is not shown and no exception is thrown

I followed this railscast to implement search on my app, but when the search is submited, the page is rendered blank. This is my show.html.erb

Resultados para <%= @search.keywords %>: <%=…

Luiz E.
  • 6,769
  • 10
  • 58
  • 98
0
votes
1 answer

Railscast Formtastic

I just watched http://railscasts.com/episodes/184-formtastic-part-1 and after implementing my code, the form and everything else worked perfectly, except that when i create the form and go to the show page, it will add an integer instead of the…
PMP
  • 231
  • 6
  • 25
0
votes
1 answer

Jquery: Jcrop not working : Railscasts 182

I am using Railscasts 182 to crop the uploaded image. As per the video I implemented this: I am uploading an image in profile page. Here is my profile controller: def edit @profile = current_user.profile if @profile.photo.nil? redirect_to…
user1977201
  • 61
  • 1
  • 9
0
votes
1 answer

has_many as: source relationship producing unexpected SQL (Railcast #364)

I am implementing the Active Record Reputation System as described in Railscast 364. I've got most of it working, including the voting and the totaling (per user and per post). I have a problem when trying to hide the voting options when a user has…
Lindsayts
  • 327
  • 2
  • 10
0
votes
1 answer

Token limit in Jquery token input

This tokeninput is from http://loopj.com/jquery-tokeninput/ I see the tutorial from http://railscasts.com/episodes/258-token-fields-revised As i am using it in many places i need sometime only one value selection while in others multiple values.…
regmiprem
  • 735
  • 2
  • 14
  • 41
0
votes
2 answers

Coffeescript cannot find div - railscast 114 revised

Trying to follow the guide of railscast 114 with the endless page using will_paginate but I get an error from my coffeescript: home.js.coffee jQuery -> if $('.pagination').length $(window).scroll -> url = $('.pagination…
OXp1845
  • 483
  • 2
  • 6
  • 20