activescaffold

How do you change the displayed order of ActiveScaffold "actions"?

I am using ActiveScaffold in a Ruby on Rails app, and have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, I would like to have the icons displayed in a different order than they are. ...

How can I display simple tooltips on icons in html?

I am using ActiveScaffold in a Ruby on Rails app, and to save space in the table I have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy"). For clarity, I would like to have a tooltip pop up with the r...

How to create multiple records at once with ActiveScaffold in ROR

I am wanting to use ActiveScaffold to create assignment records for several students in a single step. The records will all contain identical data, with the exception of the student_id. I was able to override the default form and replace the dropdown box for selecting the student name with a multi-select box - which is what I want. Th...

Composite keys with ActiveScaffold in Ruby On Rails

I am developing RoR application that works with legacy database and uses ActiveScaffold plugin for fancy CRUD interface. However one of the tables of my legacy db has composite primary key. I tried using Composite Keys plugin to handle it, but it seems to have conflicts with ACtiveScaffold: I get the following error: ActionView::Templa...

How do I tell ActiveScaffold to always show the search form in a list view?

The ActiveScaffold list view has a search form that is loaded via ajax when a user click the search link. I'd prefer to have the form show by default when a user opens a list page. I've figured out a way to trigger the ajax call when the page loads, but I'm wondering if there's a way to get ActiveScaffold to render the form automaticall...

Can ActiveScaffold be configured to show the search form before displaying a list?

When I ask ActiveScaffold to show me a very long list (for example the list of products sold), it runs the database query to get the first page of data and it displays it. If the list has a few relations, this query might take some time to execute (over a second). Most of the time, I'm not interested in this "unfiltered" list: the firs...

Ruby on Rails, ActiveScaffold and relatives in database

I have 2 tables: form, questions. Idea is very easy, every form have many question. Tables were maded form = | id | title | questions = | id | title | input | form_id | and how you can guess the form_id is key of form id. class FormsController < ApplicationController active_scaffold :form end class QuestionsController < Applicatio...

ActiveScaffold and associations

My model "combobox" has_many "comboboxselects", and "comboboxselects" belongs_to "combobox". Activescaffold of "comboboxes" displays data in comboboxselects-column like "#<Comboboxselect:0x472d25c>". How to make display the "answer" column from table "comboxselects"? Models: class Combobox < ActiveRecord::Base has_many :comboboxselect...

ActiveScaffold - Specifying Conditions in Embedded Scaffold

Hi, I have a Project model and a TaskType model. Association between the two occurs through a ProjectTaskType model (backed by a link/join table in the DB with foreign keys to both Projects and TaskTypes). A Project has_many TaskTypes :through ProjectTaskType, and a TaskTypes has_many Projects :through ProjectTaskType. I have a...

How to create custom dropdowns using the ActiveScaffold Rails plugin (http://github.com/activescaffold)?

I have several models with fields that are integers. I also have hashes that associate integers with strings (1 => Blue, 2 => Red, that sort of thing). How do you turn these into dropdown lists in an ActiveScaffold (http://github.com/activescaffold) controller? Do you need custom code, or is there just a customization that I'm not see...

How do I remove the Show/Hide links on a subgroup in ActiveScaffold?

With ActiveScaffold I have a group on my create form: config.create.columns.add_subgroup "Customer" do |customer_group| customer_group.add :customer_surname, :customer_postcode end This has a Show/Hide link which I don't want. How do I remove the Show/Hide links on a subgroup in ActiveScaffold? ...

activescaffold @records manipulation in a before filter

Hi All, I would like to call @records.collect{|r| r.set_some_virtual_attribute(@context)} before rendering an activescaffold index view, but if I do this : controller FooController < ApplicationController before_filter :change_things, :only => :index active_scaffold :foos protected def change_things @records.collect...

set instance variables with activescaffold

Hi All, I've recently added activescaffold to an existing rails project, and the problem I'm having is that the variable names that activescaffold is using are not the same as the ones I already have. Rather than go through my entire application and change all of the instance variable names, I'd like to be able to set the instance varia...

Problem with RESTful resource and ActiveScaffold

Hello everyone, I am trying to use a RESTful controller for user inside a namespace using AS and one outside for registration and so on. When i try to visit the namespaced url I get Unknown action. Once i replace active_scaffold :users with a def index; end i can the URL. My routes look like: map.register "register", :controller...

Displaying links on columns mapped to custom attributes

Say I have Course that has_many Students. I also have def top_student in the Course class. I now have an active_scaffold on top of Course, but if I add top_student as a column it show shows #, but no link. I'd like a link to the Student who is the Top Student. Any way to make this happen? ...

In ActiveScaffold a Form Override breaks Field Search

In a Rails app I have Sales and Salespeople: class Sale < ActiveRecord::Base belongs_to :salesperson end class Salesperson < ActiveRecord::Base has_many :sales end I have an ActiveScaffold for sales. I've switched on field searching and can successfully filter my sales by salesperson. However I only want to show a subset of salep...

Chaining a calendar_date_select to a select in ActoveScaffold

I am trying to chain a calendaer_date_select to a select field, so the select list is filtered by the choosen date. I have followed the instructions as described here I have in the activescaffold config: config.columns[:order_date].form_ui = :calendar_date_select config.columns[:order_date].options = {:update_column => :sale} config.co...

How to create a nifty_scaffold without worrying with the migrations?

I need to use the nifty_scaffold to generate all the views and controller for my model, but I already have the model, the migration and the table in database, so I don't need it to generate the migrations. The problem is that when it founds an old migration, it says Another migration is already named your_table: db/migrate/2009090421220...

activescaffold controller missing activescaffold work around

Hi All, I have a 3yr old application that has some controllers with some very unrestful actions. I'm trying to implement a new resource that has relationships to some of the older ones, but I want to use activescaffold to manage the nested resources rather than try to rewrite the plate of spaghetti that is the rest of the codebase. I ...

ActiveScaffold on Heroku's read-only file system?!!

ActiveScaffold apparently creates public/blank.html every time the server starts, even if that file already exists (so adding it to version control doesn't help). This is causing my application to fail to boot on Heroku, since they have a read-only file system. Can someone please tell me how to prevent this behavior or work around it s...