Well, now that I've finally got my stupid ODBC stuff configured, I took a schema.rb file that I dumped from a Postgres database and did a db:schema:load on it in a Rails project configured for SQL Server.
Well, it sets up all the schema in the SQL Server database except for a minor detail: No foreign keys are created.
The rake command...
I'm developing a new rails application which is supposed to be installed several times in order to implement several sites.
There are some things, like the "Site Title" or the "Default Number of Items per Page" that clearly belong to a "global settings" table / config file.
I've made a list of the things I think I'll need:
ActiveReco...
Is there a way to make paperclip attachments private? As in only where I explicitly want a user to be able to access a file, can the user access the file.
Obviously the file can't be in a public directory, but how do I get paperclip to check the user's access rights when trying to access that file to begin with?
...
I have an ActiveRecord class that uses acts_as_tree. I'm trying to update the to_xml method so that if a child record's to_xml is called it will return it's xml nested in the parent/ancestor xml to give the fully-qualified path to that resource. As an example I have Compiler which is a parent of Compiler/Version. Compiler should be re...
Hi. I have a Category and Subcategory models in my project. I would like to have many sub-levels in a flexible way. I thought making a self referential "parent" foreign key but I'm not quite sure how to do it. Any ideas? Thanks!
Cat1
Sub1
SubSub1
SubSub2
Sub2
Cat2
Sub1
Cat3
Sub1
Sub2
SubSub1
...
Hi. I installed restful_authentication a while ago in my project, everything works fine, except that now we requiere the users to activate their accounts via email.
I forgot to include the option "--include-activation" when I ran the generate script, is there a clean way to add it now? Or should I re-install the plugin? If so, how can i...
Running a Rails application with Fleximage in Ruby 1.8.7 works fine, but in Ruby 1.9 returned error:
/usr/local/lib/ruby/gems/1.9.1/gems/fleximage-1.0.4/lib/fleximage/model.rb:340: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.0.0]
-- control frame ----------
c:0060 p:---- s:0295 b:0295 l:000294 d:0...
Hi Everyone,
I have installed the Paperclip plugin to attempt to upload an avatar for my kase model. For some reason, the select the file button shows, and I can choose a file - but then when I click update the kase - it takes me to the show page, but the missing.png rather than the selected image.
kase.rb
class Kase < ActiveRecord::...
I have two models:
class Employee < ActiveRecord::Base
has_many :projects
end
class Project < ActiveRecord::Base
acts_as_taggable_on :skills, :roles
end
I would like to find Employees using the tags associated with their projects. The geokit-rails plugin supports a similar concept, using its ':through' relationship.
Ideally, I ...
Hopefully I can explain this well enough, but please let me know if more information is needed!
I'm building a form where a user can create an "incident". This incident has the following relationships:
belongs_to: customer (customer has_many incidents)
belongs_to: user (user has_many incidents)
has_one: incident_status (incident_stat...
Hi,
I just installed Sphinx (distro: archlinux) downloading the source. Then I installed "Thinking Sphinx" plugin for Rails.
I followed the official page setup and this Screencast from Ryan Bates, but when I try to index the models it gives me this error:
$ rake thinking_sphinx:index
(in /home/benoror/Dropbox/Proyectos/cotizahoy)
Sph...
Hi, all.
I have application with 2 groups of models - content based (news, questions) and "something" based (devices, applications etc). I need to link all models between groups - for example question may belongs to 3 different things - one application and 2 devices. The same - for news. From other side - i need to see all news articles ...
I have used Jquery -UI accordion plugin for menu (since it looks neat) and Jquery -grid rails plugin for my data. I have a vertical menu and data on the right side, however the style of the menu disappears and only grid is showing up properly. Anyone faced this issue before ?
...
What would be the best approach to creating an application on Heroku that has the capability to push data to the client?
I have looked at Juggernaut; however, it requires Flash and I am not sure about it actually running on Heroku.
Any help would be appreciated.
...
Hello,
I am using this http://github.com/professionalnerd/simple-private-messages plugin in rails and I am on a user page show.html.erb - User and I want to put a button there that, when clicked, goes to the current user's inbox and populates the field call "send to" with the "user" name.
How do I send that data along when the button i...
This is going to be a really dumb question, I just know it, but I'm going to ask anyways because it's driving me crazy.
How do I get acts-as-taggable-on to work?
I installed it as a gem with gem install acts-as-taggable-on because I can't ever seem to get installing plugins to work, but that's a whole other batch of questions that are ...
I decided to try to use the cells plugin from rails:
http://cells.rubyforge.org/community.html
given that I'm new to Ruby and very used to thinking in terms of components. Since I'm developing the app piecemeal and then putting it together piece by piece, it makes sense to think in terms of components.
So, I've been able to get cells ...
Hi I'm using the rails plugin acts-as-taggable-onand I'm trying to find the top 5 most used tags whose names match and partially match a given query.
When I do User.skill_counts.order('count DESC').limit(5).where('name LIKE ?', params[:query])
This return the following error:
ActiveRecord::StatementInvalid: SQLite3::SQLException: amb...
Hello,
Even though I know that, at least to my knowledge, this is not the default way of doing associations with ActiveRecord I'm looking for help in order to implement an "hibernatish" Polymorphic model.
For instance, consider the following base model:
# Content only has one property named path
class Content < ActiveRecord::Base
se...
I'm using the inherited resources plugin in a 2.3.5 Rails application and was wondering how to change the flash[:notice] (or any other flash) based on the success OR failure in my create and update actions.
So given the below, how do I add flash[:notice] = "All good" if success ... and flash[:notice] = "All bad" if failure?
Thanks
cla...