I'm close to releasing a rails app with the common networking features (messaging, wall, etc.). I want to use some kind of background processing (most likely Bj) for off-loading tasks from the request/response cycle.
This would happen when users invite friends via email to join and for email notifications.
I'm not sure if I should just...
I'm Ruby/Rails newbie and trying to get the laika tool (http://github.com/CCHIT/laika/tree/master) running within NetBeans IDE. I'm getting the following exception. I'm using NetBeans IDE 6.5.1, JRubby 1.1.6 and GlassFish V3. Any ideas what might be wrong?
INFO: Jruby version is: 1.1.6
INFO: Starting Rails instances
SEVERE: Exception...
In a fit of unoriginality, I'm writing a blog application using Ruby on Rails. My PostsController contains some code that ensures that the logged in user can only edit or delete their own posts.
I tried factoring this code out into a private method with a single argument for the flash message to display, but when I did this and tested i...
"-%>" appears in some code in a tutorial I'm doing, as a delimiter of some embedded ruby, like this:
<% 5.times do |i| -%>
<%= thumbnail_tag slideshow.slides[i] %>
<% end -%>
What does it mean? There's nothing in the book about it (Rails Up and Running)
...
hi, i'm having problem to deal with charset in ruby on rails app, specificially in my templates. Code that comes from my database, works fine, but codes like ç ~ that are located in my views are not working. I added the following codes to my code
I added a function like that, but that still not working i have ç ~ codes in my application...
First let me show some code.
class User
has_and_belongs_to_many :roles
named_scope :employees, { :conditions => ["roles.name = 'Employee'"], :include => :roles }
end
OK, so later in a controller I wanted to search for all the employees right. I set the named scope up to help do that with the join and conditional search. But the pr...
Hi,
I've been trying to override Rails' stylesheet_path helper, but I haven't found a way how. I can't just open the ActionView::Helpers::AssetTagHelper module and override it there, because Rails won't pick up my new method.
I know it's probably because the module gets mixed in, so how do I get around that?
...
I just have a link to a product page, at amazon. How do I get all the information (photo, price etc), in my ruby program, just using this link?
...
Expanding on recent_posts_on_self below, I want to add an all_recent_posts_on_self method but I'm not sure if it's possible using the syntax self.posts.find. On the other hand, all_recent_posts_on_class seems straightforward.
class User < ActiveRecord::Base
has_many :posts, :class_name => "Post" , :foreign_key => "author_id"
has_man...
I've been googling all night for postfix howto's, but still I couldn't figure out how do I manage to receive email on linux-server (being more specific - Ubuntu).
All I need is a catch-all mailbox which gets all emails and feeds them to the ruby script (which then passes it to Rails, of course). I was able to set-up postfix for sending ...
With this little bit of CSS, my form buttons now look flattened (2D) and I quite like the look:
input {
border: 1px solid #999;
}
However, for file fields (select file to upload), the button is still 3D. And then the border goes all around that button and the text next to it.
I tried fixing this problem by renaming input to .input,...
Is there a Rails library that allows you to insert form buttons and use them as hyperlinks instead? I think I've seen it somewhere before.
...
says if i develop a Ruby on Rails application using Rails 2.3.2, will that usually be compatible with Passenger on my hosting company?
If i ssh to my hosting company and type rails -v, i get 2.2.2... so looks like they might be using Rails 2.2.2.
So if i develop a Rails app on my Macbook and ftp all files over there, will the Passenger...
I'm doing some statics calculation in my product. A user has performed a number of operations, let's say posted comments. I want to be able to show them how many comments they've posted per week for the past month, or per month for the past year.
Is there any way with activerecord to group this way? Is my best best to simply do thi...
using Ruby on Rails 2.3.2, since I already created Scaffold for Story, so instead of experimenting and creating a new action called "new" ("new" already exists from the scaffold), i used "newnew" in the controller file and in the view file, hoping that
http://localhost:3000/stories/newnew
will be another way to create a new record....
there is a scaffold created Story... and in the create action, there is
@story = Story.new(params[:story])
i was curious as to what is in params... so i want to dump out params... but there is no view associated with the create action... is there a way to dump out its content? is there a way to dump out the POST variables in of my c...
I'm new to rails and can't figure out this issue...
I have a controller
Admin::Blog::EntriesController
defined in app/controllers/admin/blog/entries_controller.rb
And I have a model called
Blog::Entry
defined in app/model/blog/entry.rb
When I try to access my model from the controller, I get a "uninitialized constant Admin::Blog...
I added a counter cache but can't get it to update. But I can update the parent - the Blog Post model by adding a new blog post - and I can update the child - Comments model - by adding a new comment. The counter cache is supposed to keep track of the total number of comments per blog post by auto-updating the blog_posts.comments_count f...
we use
(1..10).each do |i|
p i
end
so that a value is "yield" to i in a block...
but what about
<% form_for @story do |f| %>
<%= f.text_field :name %>
<% end %>
there is no loop at all... why do we need to make it look like a loop? Can't we do it without making it look like a loop? (write in another way)?
Also, must be use ...
Hi there,
I would like to ask which is the best solution for integrating google maps into ruby on rails apps. Is a specific gem worth it or should we write our own views for it?
Thanks for any input.
...