Has anybody tried duplicating Ruby on Rails' layout functionality with Apache Tiles 2 ? I'm trying to integrate Tiles 2 with Spring. I have a previously written custom view resolver for the Spring framework that does this quite nicely, but I'm upgrading to Spring Webflow 2 and I need to be able to integrate Tiles 2
...
I want to run a standalone ruby script in which I need my RoR environment to be used. Specifically, I need my models extending ActionMailer and ActiveRecord. I also need to read the database configuration from my database.yml.
How do I go about it?
...
Is it here to stay, or is this something just pushed out quickly as a "me too" offering, in response to the Rails community?
Is it necessary to go through the learning curve, and will the Framework move to only working this way, without the Page behind model?
If so where's the best place to pick up MVC essentials for .NET?
...
I have this quiz rails app linked to an IRC bot who asks questions (yes, on IRC), where I have this Question model which contains, well, questions, answers, hints, and a few more things.
I started with Quiz model (like, say, the special Halloween or Christmas quiz) with a quiz_id in the questions table, then, I told myself, that it wou...
I am ASP.NET developer from last 5 years and still loving it. There are lots of good voices in air about Ruby on Rails. I want to ask to community, Is there any worth trying to learn Ruby On Rails as a ASP.NET web developer on following point of view.
Scalability
Documentation
Community Support
Hosting Solutions
Deployment
ETC.
...
I'd like to write a functional test of a RESTful web service I'm working on in a Ruby on Rails app.
The test is of a POST request where the body of the request is a plain XML doc and not a form. Any pointers on how to do this? The problem I'm encountering is how to specify the body XML in the call to the post method.
...
As title, I want to assert my AJAX request and test the JSON output, how can I do that?
...
Is it architecturally sound to use Rails and Oracle?
My concern is that Oracle would be too "heavy and hi-end" for Rails.
Any thoughts?
Thanks.
...
In rails I want to log some information in a different log file and not the standard development.log or production.log. I want to do this logging from a model class.
...
Say I have two tables, a master list of students containing personal info, and a list of student enrollments in classes. The two tables share a common column, which is a string uniquely identifying the student, but it is not the primary key.
Say I want to display all the enrollments on a page, along with some of the personal data from ...
In situation, when I need a webservice client, which will be used by some action controllers, how should it be implemented? As it will have some constant values (addres, parameters names) and session key, refreshed every 30 minutes, I guess model stored in database isn't the best solution. What is the best practice?
...
I need to take in a Date Range from the UI, retrieve the records within that range and plot a graph. This is the relevant section in my Rails view.
<span>
<%= check_box_tag :applyRange, @params[:applyRange]%>
From
<%= select_date Time.now, :prefix=>"fromDate" %>
To
<%= select_date Time.now, :prefix=>"toDate" %>
</sp...
I'm really struggling with grasping how to effectively use FasterCSV to accomplish what I want.
I have a CSV file; say:
ID,day,site
test,tuesday,cnn.com
bozo,friday,fark.com
god,monday,xkcd.com
test,saturday,whatever.com
I what to go through this file and end up with a hash that has a counter for how many times the first column occur...
I'm trying to generate a JSON response that includes some HTML. Thus, I have /app/views/foo/bar.json.erb:
{
someKey: 'some value',
someHTML: "<%= h render(:partial => '/foo/baz') -%>"
}
I want it to render /app/views/foo/_baz.html.erb, but it will only render /app/views/foo/_baz.json.erb. Passing :format => 'html' doesn't help.
...
In ruby, is there a way to "undefine" a variable or constant once it's been defined?
In our rails environemnts, we define one of three contants to be true, depending on the environment: TESTING, DEVELOPMENT, or PRODUCTION. Then, in controller code, we use defined? to see if what environment we're in, ie: defined? PRODUCTION.
Now, I wa...
Following on from my question on using frozen Capistrano a couple of days back I'm still having issues running Capistrano frozen in my vendor folder.
When I try and run my frozen version of cap
ruby -r rubygems ./vendor/gems/capistrano-2.5.2/bin/cap deploy-with-migrations
I get an error
... RubyGem version error: net-ssh(1.0.8 not ...
DocumentsController#common_query can handle multiple different request styles.
i.e. all docs in batch 4 or all docs tagged "happy"
I want a single route to make em pretty, so:
/documents/common_query?batch=4
/documents/common_query?tag=happy
become:
/documents/batch/4
/documents/tag/happy
So the end result is that #common_query i...
I am currently writing a Firefox extension that will sync your tab sessions across different instances of the browser. I am using a Ruby on Rails web application to sync the different URLS for each user.
The Firefox extension is using Javascript to parse out the current websites that are open. I need to send a user's login name, passw...
Suppose you are implementing a publication database and creating migrations to represent different publications. Each publication has a "year" associated with it.
t.column :year, ???
Would this year be best represented as an integer, date, or datetime?
...
Hi,
I'm somewhat new to rails so please be gentle.
I'm working on an "analytics" page for a rails app. The analytics page does not persist any data of its own (it's very primitive at this point) but does utilize metrics that I'm grabbing from the DB (via the aggregate expressions built into ActiveRecord). Aside from gathering and prese...