I'm in a situation where I need to make a call to a stored procedure from Rails. I can do it, but it either breaks the MySQL connection, or is a pseudo hack that requires weird changes to the stored procs. Plus the pseudo hack can't return large sets of data.
Right now my solution is to use system() and call the mysql command line dir...
I have been creating a website with Ruby on Rails, and will be hosting it through a friend. He has the space and capacity to host the server, and I have a system to devote to being a dedicated server. And this is my first attempt at a Rails website, plus self-hosting with a friend.
I will be formatting and preparing the server today a...
I looked in the Rails docs under inflector and found this message...
Module deprecated
This module is deprecated on the latest stable version of Rails. The last existing version (v2.1.0) is shown here.
There was no explanation or reference to any further detail.
I recalled seeing a Rails Trac website. I hunted that down and f...
In some Rails model definitions, there is a comment block at the top that contains the schema information.
# == Schema Information
# Schema version: 20090122060318
#
# Table name: table_name
# ...
Is there a good tool to generate an image of the database schema used in a Rails app?
...
I recently started digging into design patterns. Generally speaking, I thought the design issues that most of the design patterns solve do not generally occur in Ruby. Most of the design issues were because of datatypes (No dynamic typing and arrays can hold objects belonging to same class at a time etc. and many more.). Being a ruby and...
Right now I am trying to call my model, and spit out its results into json/xml format. My only problem is, my database associations aren't being loaded or queried.
Normally, I can just run this
@campaign = Campaign.find(:all)
Then get the number of hits by calling, @campaign[0].hits through the has_many :hits.
But if you debug the ou...
I'm wondering what a controller - such as the following Rails controller - would look like in Django, to perform an ajax update of the page after an asynchronous form submission (assuming the following is correct):
def create
@omelet = Omelet.new(params[:omelet])
render :update do |page|
if @omelet.save
page.replace_html 'notice',...
How could i test a model that acts_as_tree in a unit test ?
...
I am looking for a simple and automated way to store the page cache on S3 (and of course cloudfront.) I know of a plugin that does this with the fragment cache, but before I create it myself, wanted to tap into the collective wisdom here :)
Edited: To make myself more clear, I am not looking to use S3 to serve the files, but rather, th...
I have a single Rails 2.2.2 app that I want to 'share' with multiple clients. Each client has his own domain name and database. The purpose is to allow one Rails app to 'host' many websites.
I am using Apache as a front end to a mongrel cluster, as the web server. To enable Rails to know which request is for which client, Apache adds a ...
Hi,
I have the following Rails definition:
Class Book
string title
has_many readings
has_many users, :through => :readings
Class Reader
int rating
belongs_to :book
belongs_to :user
Class User
has_many readings
has_many books, through => :readings
No I want to query like this:
Give me all readings ratings for user A that have book.t...
I'd like to create a table that looks like this:
lolvalue---------|lol date|some other column data 1
lolvalue12345|lol date 2|some other column data2
in CSS/HTML. Basically, there is "data" and there is a filler that goes to the right, but doesn't count as data, so it doesn't stretch the column, filling the space stretched by the ...
Does anyone know any good Ruby, Rails or .Net specific libraries for working with barcodes?
...
I have a number of documents (mainly Word and Excel) that I'd like to make available to users of my Rails app. However, I've never tried something like this before and was wondering what the best way to do this was? Seeing as there will only be a small number of Word documents, and all will be uploaded by me, do I just store them somewhe...
How would you integrate things like this in a RESTful design?
Marking an email as read
Voting on a story
Reporting a message as inappropriate
Additionally, how would you do it in such a way that one could make a small icon link or button to do the action without too much wizardry?
...
Im starting to learn RoR and i want to make my personal blog in this language. I usually code a couple of prototypes on top of whatever im doing in my blog. So i would like people to be able to log in, and register with their openID. So i was about to jump to the coding place when i realized the concept of gems and all that stuff is giv...
Hi guys,
I'll start to develop a new app that uses a lot of heavy js librarys (prototype, scriptaculous, tinymce and so on).
Someone told me to make all the app using ajax, so all the js files will be loaded only once.
My question is, I really must do everything on ajax?
Lets say if I call myapp.com/projects and projects use all thos...
I'm using the JQuery Cycle Plugin in an attempt to fade in/out images for a slide show. I am able to get it working in Firefox and Safari, however, when I view in Internet Explorer, I see very unexpected behavior.
In Internet Explorer, the cycling is happening as expected, but some of the images do not display. They simply display a r...
Im creating a fast application with ruby on rails, and after doing a lot of scaffolding and validation im very happy with some of the features that are embeded in RoR... but i live in mexico and all my users would love the application to be in spanish of course. So, i noticed theres a lot of functions that write actual text in english fo...