What are the current best practices in the Rails world for displaying a calendar month view with event items bound to the days in the month (like in Backpack or Google Calendar, for example)?
I don't need anything like fancy stuff like drag and drop support. I'm just looking for code to let me get a list of events in my controller and ...
I have to connect my rails app in a legacy Postgre database. It uses schemas so in a SQL its is common to use something like
SELECT * FROM "Financial".budget
I want to write a Budget model but I don't know how to set the table name in this case. I've tried the following:
set_table_name 'budget'
set_table_name '"Financial".budget'
...
I am a .net developer who would like to learn more about Ruby on Rails. I have followed the 5-minute(?!) marketware tutorials, etc, out on the rails site, but would like to learn more by reading real live code.
So what's the best open source resource for learning about RoR in depth?
EDIT: A slight clarification, I am a .net developer ...
I'm currently using the ActiveRecord-based session store for my Rails app and I have a background process which clears out inactive sessions every 30 minutes.
I'd like to switch to Rails' new cookie-based session store but how do I set the expiry time of the session to 30 minutes, as opposed to the default 'at end of session' value?
...
I tried the example from Rails Cookbook and managed to get it to work. However the text_field_with_auto_complete works only for one value.
class Expense < ActiveRecord::Base
has_and_belongs_to_many :categories
end
In the New Expense View rhtml
<%= text_field_with_auto_complete :category, :name %>
Auto complete works for the first...
Does anyone know of any specific DSL implementations used to import legacy Oracle database schemas. I have tried to just run db:schema:dump on my existing db I want to port to a new ruby app. However, the rake dies about halfway through with out any error. It kinda just locks up. I started looking for the best way to tackle this and foun...
What is the best plugin for Rails that gzips my webpage output?
I found this plugin but it's out of date and I am not sure if I should use it.
-- edit --
I am running my server in a hosted environment and mod_deflate is not an option .
-- edit 2 --
The company I am hosting with has stated they will not install mod_deflate as state...
How do I go about calling a method on state change in AASM?
I'd like to call update_foo when the state transitions to paid in the following model:
class Foo < ActiveRecord::Base
include AASM
# State Machine
aasm_initial_state :incomplete
aasm_state :incomplete
aasm_state :paid
aasm_event :pay do
transitions :from => :...
I'm having trouble getting a rails app on Dreamhost's Passenger to see compiled libraries in my ~/opt/lib directory. I have to put them here because I don't have root access.
I can boot up my app in ./script/console and it sees them libraries just fine because I updated my .bash_profile's LD_LIBRARY_PATH environment variable to inclu...
Hi,
I have to connect to a legacy DB wich has a schema called "Financeiro".
I setup my database.yml to:
...
schema_search_path: Financeiro
...
when activerecord tries to find something I get the following error:
ActiveRecord::StatementInvalid: RuntimeError: ERROR C3F000 Mschema "financeiro" does not exist F.\src\backen...
We have a large application in Ruby on Rails with many filters. Some of these filters can be complex. I am looking for a way to individually test these filters with a unit test. Right now I test them by testing them through an action that uses them with a functional test. This just doesn't feel like the right way.
Does anyone have ad...
Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of doing it.
Is there a 'proper' Rails way?
...
I have created a json object from ruby with cobravsmongoose, however the attributes have the '@' symbol in front of them. Whenever I try to access them with standard object notation in JavaScript, such as object.object.object.@attribute I get a parse error. Is there another way to access these objects?
...
I have the need to display a nested set structure in HTML. I am doing it with the following partial:
<ul<%= ' id="tree"' if depth == 0 %>>
<% items.each do |item| %>
<li id="node_<%= item.id %>"><a><%= item.name %></a>
<% if item.has_children? %>
<%= render :partial => 'tree_level', :locals => {:items => item.children, :depth =>...
I am a ASP.NET Developer trying to learn Rails and RESTful approach. To understand, I am planning to write a Email client, which would make RESTful GET call to the server to fetch the emails and POST to send an email.
What are the best practices (both generic and/or specific to Rails) to be followed so that, the above application is not...
I'm looking for a way to supply an argument to a ruby on rails project at runtime. Essentially, our project uses public key cryptography to encrypt some sensitive client data and we want the ability to supply the password to the private key file at runtime.
...
I'm paralyzed by choice.
I know PHP, C# and Java fairly well as languages. Most of my web development in the past has been in PHP (with my own or other OSS frameworks). I've spent the last 2-3 years developing desktop GUI apps in C#. Before that I was doing desktop GUI apps in Java (with a little Servlets/JSP).
I want to develop a...
I have a app that I'm deploying to a development server using Capistrano. I'd like to force this deployment to use the development database. So far the only way I've managed to do it is to make my production database info in database.yml equal to the development info. But this is a complete hack.
I've tried setting rails_env to devel...
Guys,
Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages?
It is a drag when you are programming one part of an applica...
I have read about MinusMOR but it seems not really being active supported. I love this idea- is there a better supported plugin for this purpose?
...