Hi,
I have a deployed Rails application that I'd like to use with Hoptoad (an online exception notification service). It comes packaged in a gem that I installed on my deployment server, but I need to run the script/generate hoptoad every time I deploy to configure it because the Hoptoad config files/changes exist only on my production...
I am designing a REST api for one of my applications & considering using RoR for the same and had a few questions that I was wondering if Rails can support before I can decide on RoR -
1) does rails support setting HTTP response code status. So I want something like this
if customer_save_fail
response.status_code = 500
end
2) in rai...
As I understand it the point of migrations is so you can revert the database back to a known state during the last stages of development.
Right now I'm still "fleshing" out my first Rails app and I'm wondering if its ok to roll up my migrations into bigger ones rather than dozens of changes.
...
Hello
I've created a simple rails app that has a people and a notes model.
People have many notes and notes belong to people
The app works and I'm able to show all the notes for a specific person, but I'd like to be able to show a single note for a specific date.
The default scenario being todays date.
I currently have the following...
This is a rather broad question..but throwing it out there. So let's say someone comes up with a decent web service idea, build an app on open source framework. Hosts it on a VPS for less than $100/month and things pick up, users start showing up.
1 - Assumming the above happens, how does one grow from a VPS to a full fledged internet c...
http://ambition.rubyforge.org/adapters/activerecord.html
What are your experiences?
...
I'm working on an application with quite a few related models and would like to hear some opinions on how best to organize the controllers.
Here are some options I have been considering:
1) Namespace the controllers. So, for example, have a controllers/admin directory and a controllers/public directory. This seems appealing for organi...
I am writing some software in Ruby on Rails to do some simple user management for login to our server. I am working on a method for the User controller that will allow a user to change their password on the server (FTP / website login) password. I would like the administration of the server passwords to be done through the website, and...
Id like to understand the best approach when using multiple (and conflicting) javascript libraries in a rails 3 app. Before the js conflict was raised, I used the application.html.erb template to define all javascript libraries template on all pages with:
<%= javascript_include_tag :all %>
I intended to cache all the js files into one...
Started GET "/users/new" for 127.0.0.1 at 2010-07-11 23:07:03 -0400
Processing by UsersController#new as HTML
Completed in 15ms
I18n::UnknownFileType (can not load translations from /Users/johnsmith/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.0.beta4/lib/active_support/locale/en.yml, the file type yml is not known):
I check out...
Hi...I was looking for ways to include recommendations in my application. I came to know about acts_as_recommendable plugin. I would like to know your experiences while using it in your application.
I would like to specifically know about
Accuracy
Pitfalls
and any other stuff you would like to point out
Thanks :)
...
Thank you in Advance! I'm using Capistrano to cap deploy:migrations.
Two commands within the environment.rb file are causing some problems:
config.gem "coderay"
config.gem "RedCloth"
An SSH into the Dreamhost server:
gem: /usr/bin/gem1.8 /usr/bin/gem /usr/share/man/man1/gem.1.gz
[kinshasa]$ which gem
/usr/bin/gem
[kinshasa]$ gem lis...
Say I would like to do something like this, is it possible?
require 'json'
class Person
attr_accessor :fname, :lname
end
p = Person.new
p.fname = "Mike"
p.lname = "Smith"
p.to_json
...
Normally, in the new.html.erb of a model(say Product), we render the partial _form.html.erb for the form.
The _form.html.erb is located in the /app/views/products/_form.html.erb.
Is there a way i can render another _form present in the Rails root directory in an other directory...e.g say /app/views/users/_form1.html.erb.
Is there any w...
We are currently in the process of upgrading our rails version and I have come across some weird error in one of my date_select tags.
Here is the culprit:
<%= date_select :consultant_assignment, :start_date, :order => [:day, :month, :year],
:start_year => 5.years.ago.year, :end_year => 5.years.from_now.year, :use_short_month => t...
How can i render a partial inside a tag on the clicking of a href tag.
<a href = "#" class= "addWidget" value = "Add Widget">add</a>
<script type="text/javascript">
$(".addWidget").click(function(){
<%= render :partial => 'form'%>
});
</script>
...
Hi,
Do you a library like (or the good version of...) Mongoid or MongoMapper working with
rails-2.1.2 and mongo 1.0 ?
Thanks
...
This is a Ruby code:
if (@user.isAdmin?)
@admin_profile = AdminProfile.new
@user.admin_profile = @admin_profile
@admin_profile.save
@user.admin_profile_id = @admin_profile.id
else
@personal_profile = PersonalProfile.new
@user.personal_profile = @personal_profile
@personal_profile.sav...
I am new to Rails.
In my project where users have to upload a file, I store it
then I have to parse the file contents and show it in new form.
I have successfully done the file uploading portion,
now how should I read the contents of it?
...
Are there any rss parsing solutions that work with the latest rails 3 beta?
...