hi
I know about the built-in I18n in Rails, but how can I select a database field per locale?
My model structure is something like this:
title #default (englisch)
title_de #(german)
title_it #(italian)
In my template I want to be able to write only
<%= @model.title %>
and should get the value in the right language.
Is there ...
Hello, I'm using Authlogic to manage my user sessions. I'm using the LDAP add-on, so I have the following in my users model
acts_as_authentic do |c|
c.validate_password_field = false
end
The problem is that recently I found out that there will be some users inside the application that won't be part of the LDAP (and can't be a...
When someone installs this plugin, I would like a file to be copied into the config/initializers directory of the app. I could do this in install.rb by copying a template file that resides somewhere in the plugin. Another option would be to require the user to run a generator after install. I know rspec-rails makes you run a generator...
I'm use Rails 2.2.2.
Rails manual said, the way to extend controller from plug-in is:
Plugin:
module Plug
def self.included(base)
base.extend ClassMethods
base.send :include, InstanceMethods
base.helper JumpLinksHelper
end
module InstanceMethods
def new_controller_metod
...
end
end
module ClassMethods
end
end
...
So I have been asked to help maintain a website that uses Ruby on Rails. Now, let me just say I've been programming Ruby for awhile but I am still new to Rails. The first problem brought to my attention is how the activation email takes about six hours to arrive. It would be one thing if the email was not being sent due to errors but ...
Facebook gives access to
users' emails via the extended permission.
There's also a way in JS and PHP to force users to grant the
permission when they accept the app's TOS -
http://wiki.developers.facebook.com/index.php/Extended_permissions
Is there a way that I can do this with Facebooker?
Regards..
...
Im learning Rails and have built a'store' application from the 'Agile Development w/ Rails' book. Ive gone beyond the lesson in the book and Im trying to add 'tags' to each product in the the store. Id then like a user to be able to click on a tag (that will be in a list in the sidebar), and have the store repopulate with those tagged ...
Hi,
I was trying to run an OpenSource project which requires ferret to be installed. While installing it using gem install ferret, it's giving this error ->
Building native extensions. This
could take a while... ERROR: Error
installing ferret:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe ext...
Hi! Newb RoR developer here, standing at the finish line of my first paying Rails gig. It's been fun, really, and I'm glad to have it over with so I can get on to using what I've learned on the next project. The client already has their site up on a shared server at Network Solutions (go ahead, yuck it up), which professes to offer Ru...
I have an Organization that has_many Affiliations And a mission that has_one Organization
So i can do this:
m = Mission.first
m.organization.affiliations
A user also has_many affiliations so I can do:
u = User.first
u.affiliations
In declarative_authorization I want a user to be able to manage a mission if he is affiliated to the ...
Can anyone recommend some RoR plugins and/or general sage that will help me with SEO?
...
Trying to figure out how to install rails plugins manually on windows so I have a few questions.
What does the directory need to be named in vendor/plugins? Is it arbitrary or is it linked to something within the plugin config files or is that what you set in the environment.rb?
Once I've copied the files to the correct directory, do ...
Hi,
I am using facebooker in one of my applications. I want to add some application specific methods to various classes in it? e.g.
In facebooker/lib/facebooker/models/user.rb
module Facebooker
class User
# I want to add my methods here. for e.g my_method
end
end
I can not directly put my_method in the plugin itself since I ...
I'm connected to a wireless network and it's working fine on browser but not on terminal. I'm getting a timeout error when i'm trying to download any plugin for ruby
...
I am currently using a site5 server and would like
rake jobs:work pretty much running all the time.
I currently cannot send out the jobs unless i'm logged into the server. I hope that someone out there can help me with this. Had alot of trouble with ar_mailer and the whenever gem ... but have about another 5 gems working perfectly withi...
Hey. How would you optimize this SQL
SELECT SUM(tmp.cost) FROM (
SELECT DISTINCT clients.id as client, countries.credits_cost AS cost
FROM countries
INNER JOIN clients ON clients.country_id = countries.id
INNER JOIN clients_groups ON clients_groups.client_id=clients.id
WHERE clients_groups.group_id IN (1,2,3,4,5,6,7,8,9)
...
Hi there,
We have to use delayed_job (or some other background-job processor) to run jobs in the background, but we're not allowed to change the boot scripts/boot-levels on the server. This means that the daemon is not guaranteed to remain available if the provider restarts the server (since the daemon would have been started by a capis...
Hello guys, I'm trying to add some online tests to my site and before I rolled up my sleeves I was wondering if there is any ruby on rails plugin support for such a task.
Essentially I'm looking for something that lets me add multiple choice questions. Performing the scoring logic would be an added bonus.
Any one know of anything?
...
I have a typical form_for for registering user. But in the end I would like to have an option to submit data with fb_login_button. So I could save user's (manually entered) data as well as data that facebook sends me in one swing. Is that possible? If not, can I get user's facebook data wihout redirecting to new page?
...
Hi All,
Sorry for this question but after spending 1-2 hours on how to read xml, i thought posting it on forum will be better.
So i get a complex (very large)xml response from the plugin trackify. i want to read some values from it so i convert it into hash and then read it as follows
For ex:- to read city
@tracking_info['TrackResponse...