I'm trying to add a custom sort method to the Issue.rb model in Redmine from the redmine_task_board plugin. My commit on github
I don't know if this is a lack of knowledge about Rails plugins on my part or something specific I have to do with Redmine.
Redmine 0.8.6.stable
I want this method so that when I show the Task Board show met...
Hi,
I have built a free text search engine in rails ,I want to highlight search word in result page where, each word in the phrase may not be adjacent to each other( that is they may be present in any part of the text content).
I have tried with highlight method of ActionView::Helpers::TextHelper as
<%= highlight(content.body, @search_k...
On my application I've several things with attachments on them, using paperclip.
Clients have one logo.
Stores can have one or more pictures. These pictures, in addition, can have other
information such as the date in which they were taken.
Products can have one or more pictures of them, categorized (from the font, from the
back, etc)....
I'm trying to write a functional test. My test looks as following:
describe PostsController do
it "should create a Post" do
Post.should_receive(:new).once
post :create, { :post => { :caption => "ThePost", :category => "MyCategory" } }
end
end
My PostsController (a part of it actually) looks as following:
PostController < ...
Hi Guys,
I've just started on rails, got it all setup on my DreamHost account with Passenger, except the demo controller I've created isn't working. I ran:
$ script/generate controller demo index
The files are all there, but when I go to http://rails.mysite.com/demo/index I get the 'We're sorry, but something went wrong' message. The...
How can I put the creation date into the footer of my pages?
in my css file I have:
@bottom-center {
content: "www.mysite.de - Page " counter(page) "/" counter(pages) " - " ??? ;
}
??? should be the creation date in the fortmat dd.mm.yyyy
...
Hey guys, new to rails, but I have found out how to create an app now through the shell but to create an app using rails appname would give me a url of http://url.com/appname/ but I want my app, to be within the route if you understand me, so it's just http://url.com/login/ or /signup or /play so on?
So does anyone have any ideas how to...
Hi Everyone,
I am trying to get my rails application running on my web server, but when I run the rake db:migrate I get the following error:
r
oot@oak [/home/macandco/rails_apps/survey_manager]# rake db:migrate
(in /home/macandco/rails_apps/survey_manager)
== Baseapp: migrating =======================================================...
I have made a simple Rails application that allows people to comment on posts. How do I prevent that user from submitting that form over and over again? On reddit.com they only allow newer users to make new posts every ten minutes. How can I do this with my simple blog/commenting system? Any help would be greatly appreciated. Thanks for ...
Has someone a working example with sample code. I integrated the plugin as described in http://github.com/linoj/gridify. I see the grid header but no data. i have verified that I am sending data from the controller. Anyone has answers or a complete sample that is download-able?
thanks
sukanta
...
I am trying to implement Rails as a Asset Management/Risk Assessment system. I have been trying to work out the best way to model this.
A picture of what I am thinking right now.
I would like to automate as much of the treating process as possible. Ideally, someone would fill in the information for a new asset, and rails would fill...
I'm working with ActiveResource a lot so my service models are only using XML. Thus, I have no need for a respond_to block, I literally just render :xml => @model
I can't however figure out how to render a 404 header using this. I've had to resort to respond_to, which I think adds a few unnecessary method calls. Here's what I'm using...
This only happens on my local machine (Windows 7, Ruby 1.8.7). Occasionally rails will just stop returning my stylesheets/javascript and I'll get gross looking pages. If I navigate directly to those scripts, sometimes they work, and sometimes I get errors like:
private method `gsub!' called for #<Class:0x76ff830>
What could be causing...
I've got an ActiveRecord (2.3.5) model that occasionally exhibits incorrect behavior that appears to be related to a problem in its dynamic initialization. Here's the code:
class Widget < ActiveRecord::Base
extend ActiveSupport::Memoizable
serialize :settings
VALID_SETTINGS = %w(show_on_sale show_upcoming show_current show_past)
...
Does anyone know of a way to copy files with Paperclip using S3 for storage? Before I try to write my own, I just wanted to make sure there wasn't already a way to do this. Thanks
...
Hello all,
I'm sure that this question has been asked somewhere before, as the habtm relationship seems to be very confusing.
I have two models, users and promotions. The idea is that a promotion can have many users, and a user can have many promotions.
class User < ActiveRecord::Base
has_and_belongs_to_many :promotions
end
class ...
Hi, I'am looking for an easy authentication for my users mostly via facebook, but keeping OpenID and other OAuth alternatives as well. For the case if something will go very bad, I will ask my users to optionally provide their email address, which should be obtained via OpenID or OAuth if possible. The same thing is about their name.
I ...
hey, I wanted to upgrade to rails 3.0.
i followed the link below
http://oscardelben.com/install-rails-3
everything seemed to go smooth but finally....
gokul@gokul-laptop:~/Desktop$ rails -v
Rails 2.3.5
what should I do?
...
I have a rails model called 'audioclip'. I orginally created a scaffold with a 'new' action, which I replaced with 'new_record' and 'new_upload', becasue there are two ways to attach audio to this model.
Going to /audioclips/new_record doesn't work because it takes 'new_record' as if it was an id. Instead of changing this, I was trying ...
I have created a blog application using Ruby on Rails and have just added an authentication piece and it is working nicely. I am now trying to go back through my application to adjust the code such that it only shows information that is associated with a certain user.
Currently, Users has_many :posts and Posts has_many :comments.
When...