How would i go about routing www.homepage.com/site/about to www.homepage.com/about for example? I still would like to use "site" as a controller, I just want to remove it from the route.
On a separate note, ss this how you usually setup routes for pages like about and contact that appear right after the site name?
...
To make a long explanation short, suffice it to say that my Rails app allows users to upload images to the app that they will want to keep in the app (meaning, no hotlinking).
So I'm trying to come up with a way to obfuscate the image URLs so that the address of the image depends on whether or not that user is logged in to the site, so...
I was just playing around with Rails 3 beta and noticed that link_to_function is now gone. I presume there's an alternate method of achieving the same result (onclick event?) but I was wondering if there's a more Rails-3'y way of doing it. TIA.
...
I'd like to deploy a small Rails 3 app on dreamhost (just testing purposes, nothing serious) and I am wondering if anyone did it already... please chose one of
I did it and it's super easy, here's how: ...
Though I didn't try it, it should be easy, here's how: ...
It's quite complicated, but this should get you started: ....
NO WAI!!!1...
I just can't find how many apps you can host on heroku with one dyno?
I plan to host a lot of small apps with little traffic.
Thanks for your answers
...
Hi,
I am new to ruby on rails.
I have a website with a lot of static pages. I want to add a number of dynamic pages to the website and these I am going to develop in ruby on rails. The functionality offered by these pages will be triggered when the user clicks on one of the buttons which is on one of the static pages. I am thinking th...
Hi
I am investigating potential Rails plugins or Gems to help develop a SAAS type app. Specifically I am looking for help in two areas:
Restricting access to certain areas of the app based on the account's plan. For example, a bronze account allows access to some functionality, upgrading to silver unlocks access to new features and fu...
I've been using delayed_job without issues for a while now; mostly for queuing ActionMailer calls (Notifier.send_later ...). Lately it sends out random multiples of emails from the same job. I'll queue one email and I'll receive it five times, or once, or twice, all at the same time. I've restarted delayed_job and it seems to behave for ...
Hey all,
I have two problems with this code. First, regardless of what option I select from the dropdown menu, it does not update to database when clicking to submit form, yet when I refresh page, it updates the record of id 1. I basically just want to update the record that the user picks from dropdown menu. There's no associated model...
Hello,
I've come across an oddity in ActiveRecord's #relationship_ids method (that's added automatically when you declare 'has_many'), which saves immediately for existing records, which is causing me some issues, and I wonder if anyone had any useful advice.
I'm running Rails 2.3.5.
Consider this simple scenario, where an article has...
I have a User model, which belongs to Profile (belongs_to polymorphic). One model comes in two subclasses, but the *profile_type* in User always correspond to the parent model.
User < ActiveRecord::Base
belongs_to :profile, :polymorphic => true
SomeProf < ActiveRecord::Base
has_one :user, :as => :profile
SomeDeepProf1 < SomeProf
...
Are there any gems or plugins that offer a nested set but with a weight also.
I want to be able to create a nested set and order each subset by its weight.
...
Hi,
I'm using authlogic to generate a perishable token and send it on to the user for activation of his account, and send the mail later in a delayed job. Like so:
def deliver_activation_instructions!
reset_perishable_token!
Notifier.send_later(:deliver_activation_instructions, self)
end
What I'm seeing is that the peri...
Woo. My first question.
I have a feeling I'm overlooking something pretty basic in the construction of my form. I'm using attachment_fu and can't get this form to pass anything besides the file data. A user has_many profiles and a profile has_many documents.
My form looks like this:
<%= error_messages_for :document %>
<% form_for([@...
Let's say you have a project running on apache. I use capistrano to deploy new code and update a httpd.conf/other configuration files, I then reload all of my services (reloading the configs).
How is rollback managed? I wouldn't assume cap rollback would put the old configs in place and reload. Is this possible? Can you show me an examp...
Is there any site or repository to download and/or share templates for Rails applications?
Example:
# template.rb
run "rm public/index.html"
generate(:scaffold, "person name:string")
route "map.root :controller => 'people'"
rake("db:migrate")
git :init
git :add => "."
git :commit => "-a -m 'Initial commit'"
And do that:
rails myapp...
I have several static pages and a couple of dynamic pages. Static pages are under the "Info" controller. Dynamic pages are under "products". I want to access "products" from their :permalink I can only get map.info or map.products to work but not both.
ActionController::Routing::Routes.draw do |map|
map.resources :products
map...
I'm trying to deploy my first Rails app.
At first, I was getting the following error:
ActionView::TemplateError (Permission denied)
I set the permissions of the stylesheets folder to 777 (just for now until I work out what's going wrong) and the application started to work. However, it is not picking up any of the stylesheets (eve...
I am trying to create buttons ala Wufoo (Rediscovering the button element)
I would like to write the following code like the following:
<%form_tag search_path, :method => :get, :class => 'search' do %>
<%=text_field_tag :search, params[:search] -%>
<%=button_tag 'search', :name => nil-%>
<%end%>
To generate the following HTML (in...
Hi there,
I've used Prawnto quite a bit in a few Rails projects. As I'm trying to integrate it into this project, I'm unable to get it working!
I've installed the plugin, and the files are there:
script/plugin install git://github.com/thorny-sun/prawnto.git
I've added this line to environment.rb in the config block:
config.gem "praw...