Hi All
I am currently using the Permalink_fu plugin which correctly creates the following URI:
http://localhost:3000/pages/some-permalink-to-page
I now want to configure my routing so that I can drop the /pages/ part from the URI leaving me with:
http://localhost:3000/some-permalink-to-page
I tried adding the following to the bott...
I have this in one of my haml views:
-form_for :news_item_comment, :url=>{:id => comment.id, :controller => 'comment' , :action => 'add_comment'}, :html => {:id => "form-#{comment.id}"} do |f|
...
Since it's really long and hard to read I want to split it over 2 lines. Is there anyway to do this without violating haml's whites...
I'm having problem with Rails plugin attachment_fu. On every upload, I get validation error
Size is not included in the list
I'm currently using
Rails 2.3.3
Ruby 1.8.6
The only thing I found about this problem is quite outdated discussion, which didn't help much.
Is there any solution to this problem?
I'm using attachment_fu, b...
Given the size of web2py and the lack of resources and corporate support, do you think it would be advisable to learn web2py as the only web development frame work I know. I'm considersing learning ror or web2py for a website i need to create for as a school project.
this is not the 'ruby vs python' question. I just want to know what dis...
I can't seem to figure out why this association isn't working: I'm not sure how to describe the situation better than providing a code example:
Here is my application environment:
Ruby version 1.8.7 (universal-darwin10.0)
Rails version 2.3.3
And a code sample:
class Account
has_one :subscription
has_one :p...
looking to use rspec to test liquid templates. Anyone tried this? Is it possible.
Specifically our app allows users to submit a set of templates and I'd like to be able to write integration tests to validate these templates.
Alternative solutions/approaches welcome..
...
I use the latest version of textmate for all my Rails development needs and I feel that I'm under-using the possibilities or this software. I only installed the Ruby on Rails bundle and use little to no snippets / shortcuts.
What do I absolutely HAVE to know / do in order to get the most out of my textmate in a web development environm...
I am trying to figure out a graceful way to "draw" out an arbitrary tree structure, defined using acts_as_tree. My ultimate goal is to convert the parent/child relationships into a nested hash that can be converted into a Yaml file.
example tree:
root
--child
--child
----subchild
----subchild
------anotherchld
--child
--child
----subch...
I'm probably missing something obvious here but here's what I'm trying to do.
From the view, I'm calling a custom helper function
<div>
<%=display_services%>
</div>
In the helper file with the display_services function
def display_services
html = "<div>"
form_for @user do |f|
f.text_field ...
end
html << "</div>"
end
...
I've got my autocomplete plugin working perfectly... except I have certain info that I want displayed in the autocomplete divs, but I don't want to end up when the user makes their selection.
Ie... I have an auto complete for currencies... they can search by either currency code or country... as they search it displays both info along w...
Hello!
I have three models, User, Type and TypeDescription, and as you can see below, each User may have many types, but each type has only one description. So as optimization,
I thought each TypeDescription should be joined with Type via JOIN in sql, so I used default_scope and defined join, and that works when I get type via Type.find...
If you haven't seen my question yesterday, this is my second rails app. The first went nice and smooth, but this one keeps giving me one random error after another. I installed active_scaffold for this app as well as the last app (the first error, instead of using script/install plugin git://active_scaffold repository, I did script/ins...
I created model objects of from generating a scaffold, but now I want to instead of linking to
/:controller/:id (/objectname/1) to /:controller/:title (/objectname/new_blog_post). How do I do this so that links will correct link to the title and not id?
I want to go from:
/:controller/:id
to
/:controller/:name
...
I've successfully uploaded a file using PUT and html, but is there a way to upload a file in a ajax remote_form_for ?
I've tried this to no success:
<% remote_form_for @song,:html => { :multipart => true }, :url => { :action => 'upload' } do |f| %>
...
We just installed Facebooker and Authlogic on a new Rails app, but the Canvas JavaScript limitations persuaded us to choose the iframe to supply our application.
Has anyone been successful using Cucumber and facebooker with an iframe app?
I tried the instructions on
http://opensoul.org/2009/3/6/testing-facebook-with-cucumber
but the...
When I use "rake stats" I can get to know how many lines of code I have written for my RSpec tests. And my RSpec tests influences also the Code to Test Ratio.
But can I list my lines of code from the Cucumber steps there, too?
Best regards
...
How do you make the documentation available after running rake doc:app available within your project.
I know I can browse on the local machine but I want to allow other uses to browse the documentation within the application.
I have created a documentation controller within which I have an index method as follows
class DocumentationCo...
Hi there,
I can't seem to get my User model in Authlogic to understand the 'password' method even though I added "acts_as_authentic" to the model. This problem was also reported on the Authlogic lighthouse, but no one described how they fixed it:
http://binarylogic.lighthouseapp.com/projects/18752/tickets/128-undefined-method-password-o...
Our app currently spawns a new database for each client. We're starting to wonder whether we should consider refactoring this to a multi-tenant system.
What benefits / trade-offs should we be considering? What are the best practices for implementing a multi-tenant app in Rails?
...
I'd like to keep my database clean of stale almost-accounts, and I was thinking about making new signups and invitations put their data into the welcome email as an encrypted or hashed url. Once the link in the url is visited, the information is then added into the database as an account.
Is there something that currently does this? Any ...