Here is my situation. I'm trying to create a valid rss feed for an itunes podcast from an existing project. It's a rails application that allows uploading of mp3 radio shows to for listening on the site. I want to take all entries in the database and create an rss feed out of it. I'm using a builder file and everything is working fin...
Assume mailings are sent of to be processed later (i.e. through starling or delayed_job).
What I want to know is its a better practice to send email notifications from ActiveControllers or ActiveRecords?
I guess its useful to put it in the controller since you might want to control whether an email SHOULD be sent or not (i.e. after a m...
I have the following:
commentable.id =3131
In the partial:
<%=f.text_area :content, :id=> 'comment_content_' commentable.id %>
I want it to make:
<textarea id="comment_content_3131" />
How do I combine the string with a variable in the partial? Thanks
...
I am trying to port over my Rails 2.3.5 app to Rails 3, and having trouble with the following route configurations:
ActionController::Routing::Routes.draw do |map|
map.app '', :controller => 'projects', :action => 'index', :conditions => {:subdomain => true}
map.with_options :controller => 'site', :action => 'page', :sub...
Ok so i have this problem i am trying to address. I have this textfield with the id of request_money
<input id="request_money" name="request[money]" size="30" type="text">
In this textfield i have a watermark plugin that i am using with the text "Not now" which is happening via jQuery
$("#request_money").Watermark("Not Now");
This ...
When saving an object by calling Entity.create(:name => "Entity1") from the Rails console in the testing environment (RAILS_ENV=test rails console) the "Entity1" object correctly appears in the test database (MySQL) when checking it with a mysql client.
But when doing the same stuff in an rspec file (entity.create(:name => "Entity1"); sl...
I'm having huge problems with my populate.rake file - after importing my existing file from my Rails 2.3.5 installation, Rails 3 wants nothing to do with it. I'm getting tens (if not hundreds) of errors in my console, many of them for simple statements, and some even in the middle of a string of plaintext.
Has the syntax changed for Rai...
Hi,
I am having a bit of trouble with the 'workflow' gem, namely, the transitions aren't working.
What I am trying to do is very basic, I have a 'read/unread' state for messages between users, the transition is triggered when the user goes to a 'show' page for that specific message. However, I can't seem to get the transition to wor...
Is there a way to see all generated queries from rails in production environment like you can in development?
...
I have a message substitution called next_week which basically takes Date.today + 7.days.
However, although I still want to send emails on weekends, if the next_week falls on a weekend, I want it to know this and push to the Monday.
How do i do this?
...
I am a Rails newbie (from PHP). So forgive this basic data structures question:
In the controller:
@games = Game.all
@players = Player.all
In the view:
<% @games.each do |game| %>
<%= game.player_id %>
<% end %>
When iterating over the @games, instead of displaying the player id with game.player_id, I'd like to display the play...
How do I turn off transactional fixtures for only one spec (or Steak scenario) with RSpec 2?
I tried some things found on the web without any success.
This leads to an undefined method exception.
describe "MyClass without transactional fixtures" do
self.use_transactional_fixtures = false
...
end
This simply does nothing (transac...
I have used the following syntax to generate a pdf file:
Prawn::Document.generate("#{RAILS_ROOT}/public/pdf/generate.pdf") do
pdf.text "hello"
end
But when I look for the file within the /public/pdf/ folder, I dont find any file.
Well my controller code for this is
def generate
...
I do an RSpec integration test of the JQuery UI autocomplete functionality by using Capybara. When using Selenium (+ Firefox) as the web driver for Capybara everything works as it should, but when switching to Env.js as driver my tests fail. Are those known shortcomings of Env.js, or do I miss something?
...
Hi,
is there any way to switch between open windows like for example in gnome terminal (Alt+1, Alt+2,...). C+` is no comfortable for me.
...
Hi all,
I am currently using Ubuntu 10.04 for some rails development. It is installed as a guest machine using VirtualBox on a Windows 7 x64 host.
Within Ubuntu, I am trying to port tunnel several ports from a remote server directly to the Guest OS in order to avoid having to download a remote database.
Let's say I want to forward po...
I have namespace in my routes.rb
namespace :businesses do
resources :registration
end
My controller is in a subdirectory businesses/registration_controller.
def new
@business = Business.new
end
In my view, I want to do this form_for @business do |f| ... but I am getting the following error:
No route matches {:controller=...
Hi all,
In my rails application am uploading some large file(1 Gb),and
when I go windows temp folder, mongrel temporary files are gathering
there, but I would like these files to be deleted after upload
completes.
Could anyone tell me how do that??
This is my ruby version:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
...
According to the documentation for assert_template, it's deprecated. Why was it deprecated, and what should I use instead?
...
Hi,
I would like to know if there is a possibility of transferring money from my sellers customer to my seller directly without me getting involved?
Setup is like this
I've my website
Sellers register and sell their items
Customers register and buy sellers items..
What i want is to take money from customers account (be it credit ca...