Hi,
I was trying to do some refactoring and messed things up but now don't know where or how to debug because it's not clear where the problem lies.
Some suggestions on how to dig into the error and code would be helpful...thanks!
http://gist.github.com/474290
...
Here's my javascript:
$(".more_info").hide();
$(".checkbox.has_info, .has_info").focus(function(){
$(this).parent().next().next().show("fast");
});
$(".checkbox.has_info, .has_info").blur(function(){
$(this).parent().next().next().hide("fast");
});
Note, that this works perfectly in Firefox/ IE7, IE8.
So far I have discovered th...
I have a fairly complicated lookup i'm trying to do in Rails and I'm not entirely sure how hoping someone can help.
I have two models, User and Place.
A user is related to Place twice. Once for visited_places and once for planned_places. Its a many to many relationship but using has_many :through. Here's the relationship from User.
...
Hello everyone :)
I have some problem -
when i enter some custom page all is okay, but if i try to push reload buttom - rendering is fail.
so, this is log after FIRST PAGE ENTER:
Processing WidgetsController#index (for 127.0.0.1 at 2010-07-13 23:27:26) [GET]
Rendering template within layouts/widgets
Rendering widgets/index
Widge...
A gem I am using inserts an after_save callback that I would like to remove. It seems to me it would be cleaner to delete a symbol from an array than to fix the problem with a monkeypatch. How can I access the array of callbacks?
...
Hi,
I am running BDD steps with cucumber to implement my autlogic login behavior.
Scenario: log in
Given a registered user: "[email protected]" with password: "p@ssword" exists
And I am on the homepage
When I follow "Log in"
And I fill in "Username" with "[email protected]"
And I fill in "Password" with "p@ssword"
And I open the page
And I pre...
Currently I have a like/dislike voting functionality that outputs in the following format:
like (#) dislike (#)
Where like and dislike are clickable links that update the total count of like/dislike votes (represented by (#))
I am writing a cucumber test to check the like/dislike counts are correct. I'd like to check
...
Then I sh...
Hey everyone, thanks for reading this.
Ihave the next issue: When I call my "New" template (generated by scaffold) I got the next error:
<h1>ActionController::RoutingError in Flujos_de_trabajo#new</h1>
Showing app/views/flujos_de_trabajo/new.html.erb where line #3 raised:
flujos_de_trabajo_url failed to generate from {:controller=>"f...
Hi!
Just as the topic say. I want to change the default controller/:id routing to controller/:name instead in Rails 3. In Rails 2 you used named routing with something like this:
config/routes.rb
map.location 'location/:name',
:controller => 'your_controller', :action => 'your_action'
alternate named route
map.location 'goto/:na...
I want to redirect to a certain page after an action (handled by a gem) is finished.
...
EDIT: I have accidentally awarded a bounty of 500 points for this question - please do not answer it as I did this without realising what was going on - yes I'm an idiot
In rails 2.3.x, the following code would open a link in a popup window:
= link_to "resource", resource_path(resource), :popup => true
But in Rails 3 I get the error ...
I'm writing an import routine that will allow a user to upload a CSV file to load their database. Each row of the CSV corresponds to a model.
I'm using FasterCSV to read the file and split the data into individual models, which is working great. I'm just having trouble deciding on the best approach to handle errors.
Right now I have t...
I see this sometimes in a partial erb template:
<%= yield :someval %>
Other times there is no yield at all.
What's the advantage of calling yield in a partial?
...
I'm introducing comments into a Rails application, and, being exceptionally lazy, I'm looking for a plugin to do it for me. I came across acts-as-commentable, but I didn't find much else. Acts-as-commentable seems fine, but it doesn't have support for threading.
Of course, it wouldn't be too hard just to home-brew the entire thing, but ...
I am using Rails 3 beta 4.
I have the following models:
class Player < ActiveRecord::Base
has_many :players_items, :dependent => :destroy
has_many :items, :through => :players_items
end
class PlayersItem < ActiveRecord::Base
belongs_to :player
belongs_to :item
end
class Item < ActiveRecord::Base
has_many :players_items, :d...
I have a lot of data that I'm trying to seed into a polymorphic model in Rails 2.3.8. The association for all of the data is with the County model. The data looks like:
data = Datum.create([
...
{ :value => '14389', :value_type => County, :value_id =>'3103'},
{ :value => '59013', :value_type => County, :value_id =>'3105'},
{ :va...
This is a rails question about migration versions
So i have a few migrations already existing. i.e. in my db/migrate/ folder i have some files like this:
1_add_products.rb
2_add_customers.rb
3_add_addresses.rb
4_add_tags.rb
and i've ran "rake db:migrate" so the current version is 4. I want to go back to version 2 permanently and sta...
Hello,
I am trying to send a POST request to my Ruby on Rails local server. Unfortunately, at first it wouldn't let me POST because of protect_from_forgery, so I ended up setting it to false in development and production. Basically, my issue is that I'll send the POST request from my Cocoa app with all of the wanted params, and the Ruby...
Possible Duplicates:
Do I need to know Ruby in order to learn Ruby on Rails?
Should I start with Ruby or Ruby On Rails?
I'm going to start playing with ruby, is it better to learn the ruby language alone or at the same time as learning rails?
...
Lots out there about changing model names only or mapping new models to existing tables, but nothing about renaming both at the same time. For now, I'm starting with the DB table and working my way out with Find/Replace in my code, but I'm surprised there isn't something better or at least someone who's tried it and written about it.
...