activescaffold

Where to put custom JavaScript/Prototype code for an ActiveScaffold form?

I have a Select dropdown on the form of an ActiveScaffold. I am trying to hide some of the fields on the form if a particular value is selected. A [similar question][1] was posted to the ActiveScaffold Google Group, and the supplied Prototype code looks to do what I need, however I don't know where I need to add this. -- I tried taki...

Updating an ActiveScaffold form based on the selection of a drop-down

In a thread on the ActiveScaffold Google Group, I worked out the basics of hiding fields based on the value selected in a SELECT drop-down. However I am now stuck on a similar but more complicated version. I have the following models in a Rails application: class Sale < ActiveRecord::Base belongs_to :product validates_numericali...

Rails with ActiveScaffold and Lockdown plugins

Our application is developed using Rails 2.3.5 along with ActiveScaffold. ActiveScaffold adds quite a bit of magic at run time just by declaring as following in a controller: class SomeController < ApplicationController active_scaffold :model end Just by adding that one line in the controller, all the restful actions and their corres...

uninitialized constant Active Scaffold rails 2.3.5

Hi guy, I update my rails application 2.0.2 to 2.3.5. I use active scaffold for the administration part. I change nothing in my code but a problem is coming with the update. I have a controller 'admin/user_controller' to manage users. Here is the code of the controller: class Admin::UserController < ApplicationController layou...

uninitialized constant Active Scaffold rails 2.3.5

Hi guy, I update my rails application 2.0.2 to 2.3.5. I use active scaffold for the administration part. I change nothing in my code but a problem is coming with the update. I have a controller 'admin/user_controller' to manage users. Here is the code of the controller: class Admin::UserController < ApplicationController layou...

Search using created_at time in activescaffold

I am using activescaffold and i want to enable search based on the created_at time of records. I have been trying out this for weeks, but havent seen any examples on the net. pls somebody help me !! ...

ActiveScaffold complains about association

I'm using ActiveScaffold to create an Admin UI. I have two models: Post and Comments. A Post has-many Comments, and a Comment belongs-to a post. There's a validates_presences_of :text validation the Comment model. The problem is that when I create a new Post from the Admin UI without creating a new Comment in the subform, ActiveScaff...

ActiveScaffold: How to create a drop-down select for polymorphic association?

I'm trying to create a drop-down select box for a polymorphic association with ActiveScaffold. I have: class Award belongs_to :sponsorship, :polymorphic => :true end class Organization has_many :awards, :as => :sponsorship end class Individual has_many :awards, :as => :sponsorship end While trying to create a select drop-down...

Is it possible to implement has_many, :through with ActiveScaffold?

Consider the following models: class Artist < ActiveRecord::Base has_many :artist_events has_many :events, :through => :artist_events end class Event < ActiveRecord::Base has_many :artist_events has_many :artists, :through => :artist_events, :order => 'artist_events.position' end class ArtistEvent < ActiveRecord::Base defaul...

ActiveScaffold: How do I set the default value for a drop down list?

So I have this create form to create schedules where there is a bunch of fields and one of them is seasons. And seasons table has a field called 'is_current' which if set to 1 tells us that it is the current season. When the create form is display , I want the current season to be selected by default in the seasons drop down. Any help wi...

ActiveScaffold keeps rounding my numbers

I need to display & edit highly precise decimal numbers - latitude and longitude. ActiveScaffold keep rounding my values to precision 6 scale 3, can I change that to precision 11 scale 8 somewhere? Thanks ...

Active Scaffold + Ruby 2.3.5 not working

Hello, I have an application with Rails 2.3.5. And Im trying to use AS latest version, I have used it previously but cant make it work here. I have my ingredient_categories Controller, where i put class Administration::IngredientCategoriesController < ApplicationController layout "default" active_scaffold :ingredient_categories en...

rails 3 is printing html tags to screen instead of rendering them

I'm using vhochstein's fork of active_scaffold, which runs quite nicely on rails 3, except for a few small bugs - http://github.com/vhochstein/active_scaffold. In rails 2.3, the following code disables a link: return "<a class='disabled'>#{text}</a>" unless authorized But in Rails 3, it causes the escaped html tags to be printed out ...

Is there an ActiveScaffold equivalent for Django?

A while ago I created a frontend for a database using RoR and ActiveScaffold. ActiveScaffold let me easily create lots of the features I needed: Read Only Access, Sexy Interface, Sorting, Advanced Search, Pagination etc. I would now like to do the same thing in Django. Is there any equivalent to ActiveScaffold for Django? Do I need to u...

Rails + ActiveScaffold -> set_default_options

I can't seem to set default options at the ApplicationController level. I can do it just fine at the Controller level, but I want to be able to set some defaults here. This is the code that I'm using (for example): ActiveScaffold.set_defaults do |config| config.update.link.label = "" config.list.per_page = 15 end Any help wo...

RoR: How to handle custom nested form's submit

Hello! I managed to do almost all the way towards happiness with my custom form in ruby-on-rails, but the very last step is missing and it is impossible to find the answer on the net because of too many common words. I believe that the answers to my questions are trivial for people who have done RoR for a time, but be warned that the p...

Rails 3.0 ORM agnostic admin plugin

Hey fellow Rail-ists, do know any equivalent of ActiveScaffold but being ORM agnostic or at least for Mongoid? ...

RoR: Listing of subrecords

Schema: persons (id, name, birthyear, gender) pets (id, person_id, name, leg_count) plants (id, person_id, kind, qty) I would like to make a read-only report about these things grouped by persons. The listing of personns is done (without the associated records). I would like to have "subtables" per persons. Something like: Persons +...

ACTIVESCAFFOLD: Display column hidden by conditions

Adding conditions to an activescaffold hides the column that the condition is on. For example, I have an 'is_active' column on an embedded scaffold. If I set the condition to include ':is_active => true', the is_active column does not show. I would like this column to continue to show even with the condition. So, for example, my ...

Could not find generator active_scaffold_setup.

Following this tutorial for setting up ActiveScaffold with Rails3: http://vhochstein.wordpress.com/2010/08/28/setupactivescaffoldrails3/#comment-4 and, when I run the following command: rails g active_scaffold_setup prototype I get: Could not find generator active_scaffold_setup. Why is that? And, what should I do? Thanks. ...