Re: javascript_for_update_column helper

2023-10-26 Thread Sergio Cambra
You can add the associated records in the after_render_field method in the controller, and set them to an instance variable. Then you can create render_field.js.erb, with <%= render :super %> and add code to render the rows for the new associated records. However you will have to add some JS to

Re: Override redirect after create

2023-04-11 Thread Sergio Cambra
escribió: > Hi Sergio, > > The AS create actions was using create_respond_to_js so the redirect to an > HTML page failed.. > > So I added to the controller: conf.create.link.page = true > > Then the redirect to an HTML page works. > > Thanks! > > Dennis >

Re: Override redirect after create

2023-04-11 Thread Sergio Cambra
Hi Dennis If you are using the AS create action, it uses create_respond_to_html to redirect to the listing. def create_respond_to_html if successful? flash[:info] = as_(:created_model, :model => ERB::Util.h(@record.to_label)) if (action =

Re: Created a show helper, lost the association create

2023-04-07 Thread Sergio Cambra
late opts = args.any? ? args.first : {} > render :partial => params[:adapter][1..-1], > > :locals => {:payload => render_to_string(opts.merge(:layout => > :false), ).html_safe}, # rubocop:disable > :Rails/OutputSafety use_full_path

Re: Creating an "Edit' link back to AS edit form (JS, not HTML)

2023-04-03 Thread Sergio Cambra
https://www.rubydoc.info/gems/active_scaffold_san/ActiveScaffold/Helpe > rs/ViewHelpers#get_action_link_id-instance_method>. > > As an aside, do you have a “demo” AS application you use for testing that > has many of the controller config options in use, and helpers etc.? > > Thanks

Re: Created a show helper, lost the association create

2023-04-03 Thread Sergio Cambra
ase.rb:247:in `public_send' > > actionview (6.1.7.3) lib/action_view/base.rb:247:in `_run' > > Not sure if this is an AS bug? Or a problem somewhere in my code? > > Thanks > > Dennis > > From: Dennis Bulgatz > Date: Saturday, April 1, 2023 at 11:08 PM > To: Ser

Re: Created a show helper, lost the association create

2023-03-31 Thread Sergio Cambra
You can override column_renders_as to return :subform for that column. Also you can add debug lines to the log to see what condition is true and makes the helper to return :field logger.debug column.association.nil? logger.debug column.form_ui logger.debug

Re: Created a show helper, lost the association create

2023-03-31 Thread Sergio Cambra
Hi Dennis There is a helper method, column_renders_as, which should return :subform for column travels. It would return :field if subform action has been excluded from travels controller, form_ui has been set for the column, or a helper _form_column has been defined for the column. Defining

Re: Creating an "Edit' link back to AS edit form (JS, not HTML)

2023-03-24 Thread Sergio Cambra
Hi Dennis ActiveScaffold has a setting to show all the actions (same actions displayed in the row) on the show action, when open on a page, not inline. It's the partial _show_actions.html.erb, called in show.html.erb. There is a helper method that you can override to control what links are

Re: TinyMCE not finding tiny-mce-jquery

2023-03-13 Thread Sergio Cambra
That doc is old, and never updated, but it was only a example, the valid settings should be check with tinymce docs. Anyway, I'm changing advanced to so it doesn't confuse other people. El lunes, 13 de marzo de 2023 4:46:36 (CET) Dennis Bulgatz escribió: > The issue I had is that the example

Re: TinyMCE not finding tiny-mce-jquery

2023-03-10 Thread Sergio Cambra
It's the only one integrated with AS. I don't know if there is any other which would be easy to integrate, it's the only one I have used with AS. El vie., 10 mar. 2023 19:09, Dennis Bulgatz escribió: > Sergio, is TinyMCE the most common rich text editor? Or is there something > that is a better

Re: TinyMCE not finding tiny-mce-jquery

2023-03-10 Thread Sergio Cambra
Hi Dennis The changes to support tinymce6 are in master branch, are you using master or 3.6.x? Best regards El viernes, 10 de marzo de 2023 8:47:33 (CET) Dennis Bulgatz escribió: > Hi Sergio, > > I wanted to try out TinyMCE. But cannot find one of the needed assets > tiny-mce-jquery. > > Do

Re: Support for Ruby 3

2023-02-16 Thread Sergio Cambra
Hi Dennis Master branch should work with ruby 3, v3.6.x don't support it. There are changes on master branch related to ruby 3 support, and CI is testing (although tests don't fully cover AS yet). Master is pretty stable, I will release a new minor version soon, so you should be good using

Re: Support for Rails 7

2022-03-31 Thread Sergio Cambra
El martes, 29 de marzo de 2022 4:04:27 (CEST) chongh...@gmail.com escribió: > Hi > > Will there be support for Rails 7 ? There will be, I'm not sure when I will have time. You can help testing and sending bug reports, download master branch, setup Gemfile using path for active_scaffold, e.g.:

Re: Conditions For Collection over-ridden by search params

2022-03-01 Thread Sergio Cambra
El lunes, 28 de febrero de 2022 22:41:00 (CET) 'Dennis Bulgatz' via ActiveScaffold : Ruby on Rails Gem escribió: > Hello, > > I am using the "conditions for collection" method in the controller to add > sql for security trimming. This works fine for a straight list, but when a > user runs a

Re: Activestorage

2022-02-17 Thread Sergio Cambra
Hi Nice it's working. I found how to rotate image with imagemagick, I don't know if it's something you can use: https://stackoverflow.com/questions/19456036/detect-exif-orientation-and-rotate-image-using-imagemagick[1] I don't think ActiveScaffold works with rails 7.0 yet, I haven't tested,

Re: Activestorage

2022-01-17 Thread Sergio Cambra
he latter, I think it isn't possible, I think browser doesn't > >>> allow > >>> to set value attribute for input file tag. > >>> > >>> > >>> > >>> El martes, 17 de marzo de 2020 18:18:50 (CET) Gloufy escribió: >

Re: Icons from CSS not getting complete URL

2021-04-16 Thread Sergio Cambra
Hi I think you must setup config.relative_url_root or something similar, or maybe defining RAILS_RELATIVE_URL_ROOT in apache with SetEnv. ActiveScaffold uses image_path, as any other rails app, so it should work if app is right. I have tested with 6.0.3.3 and 5.2.5, both with active scaffold

Re: Icons from CSS not getting complete URL

2021-04-15 Thread Sergio Cambra
I don't think so, I think right method in SCSS is image-url I have never used path prefix with rails. I have search how it should work and the right way is using RAILS_RELATIVE_URL_ROOT. However I don't know if it makes a difference using RAILS_RELATIVE_URL_ROOT at beginning or at end, I

Re: Date Searches

2021-04-08 Thread Sergio Cambra
Hi Dennis Yes, you're right, it has been like that for a long time, or maybe always, I don't remember. When jquery-ui-rails is used, search_ui for date and datetime fields is set to date_picker and datetime_picker, and there are some helpers rendering those advanced search options (past,

Re: Toggle Search

2021-02-26 Thread Sergio Cambra
I only knew one person who tried to develop with ruby in Windows and found many issues, finally he changed to Linux, I think it's possible, but I don't think is very common, although it was years ago, maybe it's easier now. El vie., 26 feb. 2021 17:12, Dennis Bulgatz escribió: > Glad to help.

Re: Toggle Search

2021-02-24 Thread Sergio Cambra
Hi Dennis Thanks for your contribution, it's really helpful. Regards El martes, 23 de febrero de 2021 18:35:01 (CET) Dennis Bulgatz escribió: > HI Sergio, > > I will work on the wiki pages to add some examples and maybe the Mac setup > for Active scaffold in this thread. I have authored more

Re: Toggle Search

2021-02-23 Thread Sergio Cambra
Dennis That would be great, every help is needed. My long term plans are move API doc from wiki to rdoc, which means adding rdoc comments to methods, at least for files in config and data_structures directories. And also in some methods of actions and helper modules, explaining methods which

Re: Toggle Search

2021-02-23 Thread Sergio Cambra
Hi Dennis Yes, you are right about rails 6, that's why I haven't released 3.6.0 yet. I started to work on supporting webpack, but finally I decided I will postpone webpack support to later version. But generator needs to work with 3.6.0, setting up javascript pipeline, then I will release

Re: Toggle Search

2021-02-22 Thread Sergio Cambra
Hi This is how I did in the past, it's in a project I haven't upgraded to master yet, but I think it should still work: config.actions << :field_search config.field_search.link.parameters = {:kind => :field_search} Regards El domingo, 21 de febrero de 2021 6:14:53 (CET) Dennis Bulgatz

Re: Toggle Search

2020-12-04 Thread Sergio Cambra
El jueves, 3 de diciembre de 2020 15:48:53 (CET) jhe...@gmail.com escribió: > Hi > > Is it possible to add an action/button/whatever to let my users toggle > between seach and field search in an List? > > Regards, Jan Hi By default, you must choose if you want to use search or field search

Re: Active Scaffold Export- Select All, Select None JS close Export Form

2020-08-12 Thread Sergio Cambra
Hello I have fixed JS in master branch to avoid closing form (indeed turbolinks was reloading page). Export gem is using inline JS, it should be updated to use JS asset instead of inline JS, but I don't have time now. Regards El martes, 11 de agosto de 2020 20:08:33 (CEST) Dennis Bulgatz

Re: Column Helpers for Active Scaffold Exports

2020-08-12 Thread Sergio Cambra
Hello Helper override for export are called _export_column: https://github.com/activescaffold/active_scaffold_export/blob/master/lib/active_scaffold/ helpers/export_helpers.rb#L31[1] They get only record argument, you can call your _column helpers from those. Default helpers rendering

Re: List to CSV or Excel with ActiveScaffold and Rails 6

2020-08-11 Thread Sergio Cambra
Hi I was out and couldn't test it before. I have checked with both rails 5.2 and rails 6.0 and I get export link, next to seach, just with config.actions.add :export line. What rails version do you use? And active_scaffold version? You may try master branch of active_scaffold, although I

Re: List to CSV or Excel with ActiveScaffold and Rails 6

2020-08-06 Thread Sergio Cambra
That gem is not updated to latest active scaffold version, try with this fork: https://github.com/activescaffold/active_scaffold_export I think it works with newest activescaffold, but nobody confirmed yet. Also i'm waiting to get permission to release new version in rubygems.

Re: Rails 6

2020-07-09 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
function. Anyway, I have wrapped params for reorder with Arel.sql, which should be good, because this change is trying to protect against order(params[:requested_order]) usage. El viernes, 15 de mayo de 2020 17:08:42 (CEST) 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem escribió

Re: Rails 6

2020-05-15 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Sorry, I thought you got that warning with rails 6.0, but I saw that deprecation doing some testing with rails 5.2, so I guess ActiveScaffold won't work with rails 6.0 yet. El viernes, 15 de mayo de 2020 14:36:16 (CEST) 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem escribió

Re: Rails 6

2020-05-15 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
It should be safe as it's a deprecation warning. It should still work with rails 6.0, but I will have to find out how to do in a way accepted by rails 6.0, to get rid of these deprecation warnings, and have it working for 6.1 Probably params to order should be wrapped with Arel.sql always.

Re: Activestorage

2020-03-18 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
A way could be using JS to display error messages instead of replacing form, although fields won't get any class to highlight them with CSS, unless JS make some changes to existing fields too. El miércoles, 18 de marzo de 2020 13:25:28 (CET) 'Sergio Cambra' via ActiveScaffold : Ruby

Re: Activestorage

2020-03-18 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
I think you can override that helper in your controller helper, or ApplicationHelper. I think it should work as dragonfly does, there should be a thumbnail_variant setting in ActiveScaffold::Bridges::ActiveStorage::ActiveStorageBridgeHelpers, default to something like {resize_to_limit: [nil,

Re: Activestorage

2020-03-17 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
ActiveStorage bridge was a contribution, I didn't write it, I haven't tried ActiveStorage yet. However, I can see form_ui is calling helper for list and show actions to display content, as other bridges related to file upload do. Form_ui has this line: content =

Re: subform for has many relation

2020-03-10 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Have you tried to set form_ui = :select in association column? Anyway, loading a form with so many options, select or checkboxes may be slow. For that case, I use record_select. El martes, 10 de marzo de 2020 17:17:44 (CET) Jan Hebler escribió: Hi is it possible to edit an has_many

Re: Activescaffold sortable

2020-03-09 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Are you using jquery-ui-rails gem? Or did you include jquery ui sortable in your manifest? El domingo, 8 de marzo de 2020 21:31:28 (CET) Gloufy escribió: Hey I've got this error when I'm trying use sortable plugin :) Do you know why ? Thanks Gloufy -- You received this message

Re: ActiveScaffold rails 5.2 example (jquery stuff not working)

2020-02-10 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Can you try with master branch, or 3.6.0.pre? Support for rails 5.2 were added to ActiveScaffold 3.6 which is not released yet (but I think it's pretty close), although older versions had requirement for rails >= 4.0.5 only, when issue with rails 5.2 was reported requirement was changed to

Re: Chaining form fields via subform

2019-11-07 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
El miércoles, 6 de noviembre de 2019 21:49:24 (CET) Big Mister T escribió: Running into a situation where the second column is not updating as expected when opening a record to edit via a subform. When you open to edit, the values in the second column are not constrained based on the value

Re: New own bridge

2019-11-07 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Sorry, I forgot to answer. You can put in your lib directory, and you will have to add it to ActiveScaffold::Bridges, or manually call run method of your bridge in an initializer. ActiveScaffold use ActiveScaffold::Bridges.register with path, but it expects active_scaffold/ bridges/.rb path,

Re: Action List to json : it’s possible to paginate ?

2019-08-13 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
El lunes, 12 de agosto de 2019 22:57:20 (CEST) Gloufy escribió: > Hi, > > It’s possible to get a json from a list and paginate like when i get it in > html page=1 etc? Thank you for your help > > Gloufy Hi It's not possible by default, but you can override find_page_options in your

Re: Field search on virtual attribute

2019-02-11 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Hi Jim Proc is not supported for search_sql: https://github.com/activescaffold/active_scaffold/wiki/API:-Column#search_sql Regards El sábado, 9 de febrero de 2019 23:55:12 (CET) Jim escribió: I think I've come across a bug in searching on a virtual column. It seems that search_sql has to

Re: How to close show view after clicking link

2018-11-28 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Hi There is no way inside ActiveScaffold to update show view, if you want to update row and show view you have to write your own view. There is 2 ways: Create app/views/controller/on_action_update.js.erb, call render :super and add code to update show view: <%= render :super %> <% if

Re: Link directly to edit form

2018-07-25 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Hi Jim I'm not sure if I get what you ask for. URL to edit form it's /controller/id/edit, it will open edit form in page. If you ask for an url listing one row and open edit form, there is no one, but there is url to listing one row (/controller/id/list), you can override list.html.erb and

Re: Disable submission

2018-06-14 Thread 'Sergio Cambra' via ActiveScaffold : Ruby on Rails Gem
Hi Ofek You have to bind change events with js on those fields and disable/enable submit button. Active scaffold adds a class with column name to each input ([column_name]-input) which you can use to bind events to. For example with jQuery: $(document).on('change', '.column-input', function {

Re: Is it possible to add group-clause to sort by?

2018-03-08 Thread Sergio Cambra
El jueves, 8 de marzo de 2018 6:36:43 (CET) Jan Hebler escribió: > Am Mittwoch, 7. März 2018 12:19:47 UTC+1 schrieb Sergio Cambra: > > SQL standard requires to include every column in select in the group by, > > but > > traditionally mysql didn't require it and it a

Re: Is it possible to add group-clause to sort by?

2018-03-07 Thread Sergio Cambra
es"."id" AS t1_r0, > "vulnerabilities"."title" AS t1_r1, "vulnerabilities"."score" AS t1_r2, > "vulnerabilities"."created_at" AS t1_r3, "vulnerabilities"."updated_at" AS > t1_r4, "vulnerabilit

Re: Is it possible to add group-clause to sort by?

2018-03-06 Thread Sergio Cambra
You have to define custom_finder_options and add group options when active_scaffold_config.list.user.sorting.sorts_on? :findings def custom_finder_options if active_scaffold_config.list.user.sorting.sorts_on? :findings {group: 'tbl_node.node_id'} else {} end end El lunes, 5 de

Re: Remotipart conflict error resulting in a Stack too deep

2018-01-02 Thread Sergio Cambra
I'm afraid they are not compatible, if they would use prepend and super, instead of alias, it should work. However, I guess it isn't possible to override a method twice, once using alias and once using prepend. Prepend is the recommended way for newer ruby versions, I guess they still using

Re: Starting with Active Scaffold

2017-12-18 Thread Sergio Cambra
Did you add jquery and jquery_ujs to application.js? Your application.js must be like: //= require jquery //= require jquery_ujs //= require active_scaffold //= require turbolinks //= require_tree . Maybe README doesn't work for rails 5.1 because jquery is not added to js manifest by default.

Re: Reload configuration

2017-11-09 Thread Sergio Cambra
El miércoles, 8 de noviembre de 2017 18:57:47 (CET) Jim escribió: > Currently I have a column set up like this: > > columns[:delivery_method].form_ui = :select > columns[:delivery_method].options = {options: ['', 'hand-delivered', > 'shipped']} > > I would like to populate the delivery

Re: Search field Override ??

2017-10-02 Thread Sergio Cambra
You can't, it's a class method, you can create a field search helper which sends two values for near or zippostal in a hash, so you have both in your condition_for__column method. Another hack would be create a condition_for_zippostal_column, save value in Thread.current variable and return

Re: new_model in _list_with_header results in HasManyThroughNestedAssociationsAreReadonly

2017-07-04 Thread Sergio Cambra
EST) Jan Hebler escribió: > Am Montag, 3. Juli 2017 22:20:30 UTC+2 schrieb Sergio Cambra: > > ensure_not_nested must be a method in your app, I don't find it in > > activescaffold code. > > No, Sorry. ensure_not_nested is an Method in active_record. Please see the > Stacktrac

Re: new_model in _list_with_header results in HasManyThroughNestedAssociationsAreReadonly

2017-07-03 Thread Sergio Cambra
ensure_not_nested must be a method in your app, I don't find it in activescaffold code. You could avoid calling it when action name is index, or move out of new_model method and add it as before_action only in needed actions. ActiveScaffold needs to build @record to display search form, so it

Re: beginning_of_chain and field search

2017-05-04 Thread Sergio Cambra
It should work if filtre param is set when field search is sent. Can you check that param is present when field search form is open and when search form is sent? El martes, 2 de mayo de 2017 19:15:36 (CEST) Gloufy escribió: > Hi everybody ! > > I'm using beginning_of_chain > > def

Re: list.per_page not honored

2017-04-05 Thread Sergio Cambra
El miércoles, 5 de abril de 2017 15:41:21 (CEST) Chee Chong Hwa escribió: > Hi Sergio > > Controller code : > > class TasksController < ApplicationController > active_scaffold :"task" do |conf| > > conf.label = "Tasks" > conf.columns = [:task,:date,:rootcause,:priority,:suggestion, >

Re: list.per_page not honored

2017-04-04 Thread Sergio Cambra
El martes, 4 de abril de 2017 0:48:37 (CEST) CCH escribió: > Hi Sergio > > I use the master branch as I am using Rails 5.02 at the moment. > Recently, I noticed that list.per_page=5 is no longer honoured as the page > shows 10 lines. > > Can you please check on this ? Hi I have checked and it

Re: test failure using active_scaffold

2017-03-24 Thread Sergio Cambra
El jueves, 23 de marzo de 2017 2:41:56 (CET) CCH escribió: > Hi Sergio > > 1. rails g active_scaffold:resource Pms4w10 date:date request_by module > feature rootcause priority suggestion:text action:text completed:boolean > date_completed:date released_version priority_id:integer >

Re: Minitest::UnexpectedError: NoMethodError: undefined method `level' for nil:NilClass

2017-03-24 Thread Sergio Cambra
El jueves, 23 de marzo de 2017 2:21:22 (CET) CCH escribió: > Hi Sergion > > Test Failed at: > Minitest::UnexpectedError: NoMethodError: undefined method `level' for > nil:NilClass > app/models/fas4gst4sql.rb:11:in `authorized_for_delete?' >

Re: DEPRECATION WARNING: /lib/active_scaffold/core.rb:47

2017-03-22 Thread Sergio Cambra
I have released versions of next gems without before_filter, they won't work with rails 3.2 anymore: active_scaffold_config_list active_scaffold_sortable active_scaffold_duplicate active_scaffold_batch El miércoles, 22 de marzo de 2017 13:59:53 (CET) Sergio Cambra escribió: > That l

Re: DEPRECATION WARNING: /lib/active_scaffold/core.rb:47

2017-03-22 Thread Sergio Cambra
That line is including a module, so some activescaffold action (from activescaffold or any activescaffold related gem) is using before_filter. master branch for activescaffold doesn't use before_filter, so it must be any activescaffold related gem, what gems are you using? El miércoles, 22 de

Re: Deprecation Warnings: Use before_action instead of before_filter

2017-03-16 Thread Sergio Cambra
ld_export > > :-( > > On 15 March 2017 at 21:32, Sergio Cambra <ser...@programatica.es> wrote: > > master branch of ActiveScaffold doesn't use before_filter anymore, line 47 > > of > > core.rb is including an action module, I guess export action from > > act

Re: Deprecation Warnings: Use before_action instead of before_filter

2017-03-15 Thread Sergio Cambra
master branch of ActiveScaffold doesn't use before_filter anymore, line 47 of core.rb is including an action module, I guess export action from active_scaffold_export, which still uses before_filter. You should open issue in https://github.com/naaano/active_scaffold_export asking for replacing

Re: Cloning a record

2017-03-15 Thread Sergio Cambra
JS post request will try to duplicate record, won't display form prefilled with cloned record El miércoles, 15 de marzo de 2017 5:30:05 (CET) Chee Chong Hwa escribió: > Hi Segio > > Yay, it works after I remove the initialize_dup codes :-) > > > "Another issue is you are getting a JS post

Re: Cloning a record

2017-03-14 Thread Sergio Cambra
El martes, 14 de marzo de 2017 6:12:16 (CET) Chee Chong Hwa escribió: > Hi Sergio > > *Model tasks.rb* > def initialize_dup(other) > super > self.items = other.items.map(&:dup) > end > > *tasks_controller.rb* > > # 14/3/17 >conf.actions << :duplicate >

Re: Cloning a record

2017-03-13 Thread Sergio Cambra
El sábado, 11 de marzo de 2017 4:29:10 (CET) Chee Chong Hwa escribió: > HI Sergio > > Trace from rails server > Started GET "/tasks/26/clone?adapter=_list_inline_adapter" for ::1 at > 2017-03-11 > 11:26:59 +0800 > ActiveRecord::SchemaMigration Load (0.0ms) SELECT `schema_migrations`.* > FROM

Re: Are global variables prefxed with $ respected within active_scaffold :"controller name" do |conf|

2017-03-08 Thread Sergio Cambra
El miércoles, 8 de marzo de 2017 14:51:51 (CET) Chee Chong Hwa escribió: > Hi Sergio > > Just saw your last suggestion on not using global variable. > > This works great ! > > def can_show_create_link > # if $level > 0 >if current_user.level > 0 >return true >else > return

Re: Are global variables prefxed with $ respected within active_scaffold :"controller name" do |conf|

2017-03-08 Thread Sergio Cambra
El miércoles, 8 de marzo de 2017 10:16:30 (CET) Chee Chong Hwa escribió: > Hi Sergio > > 1. In my seesions controller > def create > user = User.find_by(username: params[:username]) > if user && user.authenticate(params[:password]) > *$level*=user.level > end > end > > 2. in my tasks

Re: can I specify ignore_method on an action_link?

2017-03-07 Thread Sergio Cambra
El viernes, 3 de marzo de 2017 18:17:33 (CET) Jason Fleetwood-Boldt escribió: > Simple question: Can I specify an ignore_method on this action link? > > When I try this: > config.action_links.member.add :override_weight_limit, label: 'Override > Weight Limit', :method => :put, :page => true,

Re: per_page global local

2017-02-28 Thread Sergio Cambra
El domingo, 26 de febrero de 2017 5:46:48 (CET) CCH escribió: > Hi Sergio > > As per https://github.com/activescaffold/active_scaffold/wiki/API:-List > > per_page *global local* > > How many records to show on each page. Set to something ridiculously high > to effectively disable pagination.

Re: conf.columns[:rootcause].form_ui = :record_select - Request Failed Error

2017-02-23 Thread Sergio Cambra
Yay ! It works > > But its shows as Root Cause:FEATURE, how can I make as FEATURE ? > > On Thursday, 23 February 2017 22:12:32 UTC+8, Sergio Cambra wrote: > > Add record_select_routes to your resources routes: > > > > > > > > resources :rootcauses do > &g

Re: conf.columns[:rootcause].form_ui = :record_select - Request Failed Error

2017-02-23 Thread Sergio Cambra
task,:date,:rootcause,:suggestion, :action,:completed, > > :version ] > > conf.columns[:rootcause].form_ui = :record_select > end > end > > Why am I getting the Browse error message ? > > On Thursday, 23 February 2017 19:40:01 UTC+8, Sergio Cambra wrote: >

Re: conf.columns[:rootcause].form_ui = :record_select - Request Failed Error

2017-02-23 Thread Sergio Cambra
; l_erb___571246829_83175600' > Rendering > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-5.0. > 1/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb > withi > n rescues/layout > Rendering > C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/g

Re: conf.columns[:rootcause].form_ui = :record_select - Request Failed Error

2017-02-22 Thread Sergio Cambra
To use :record_select form_ui you need to install recordselect gem El miércoles, 22 de febrero de 2017 9:55:06 (CET) Chee Chong Hwa escribió: > Hi Segio > > Tried to use > > active_scaffold :"task" do |conf| > conf.label = "Tasks" > conf.columns = [:task,:date,:rootcause,:suggestion,

Re: Which initializer file

2017-02-22 Thread Sergio Cambra
You can use whatever initializer, it doesn't matter, but I would create new initializer to avoid mixing things. El miércoles, 22 de febrero de 2017 3:03:32 (CET) Chee Chong Hwa escribió: > HI Sergio > > IN your excellent article at >

Re: Slow speed in loading localhost:3000/employees

2017-02-20 Thread Sergio Cambra
El sábado, 18 de febrero de 2017 18:11:45 (CET) Chee Chong Hwa escribió: > Hi Sergio > > Environment: > Rails 5.01 + Ruby 2.26 > Windows 8.1 Pro 64-bits > Active_scaffold - master branch > > 1. Started a new project via rails new appname -d mysql > 2. launch localhost:3000 first time > time

Re: embedded since rails 5.0.1

2017-02-06 Thread Sergio Cambra
the same.. > i will search how to disable cache_action_link_urls ActiveScaffold.set_defaults do |conf| conf.cache_action_link_urls = false end Or, in your controller: active_scaffold :model do |conf| conf.cache_action_link_urls = false end > > Le lundi 6 février 2017 14:44:40 UT

Re: config.columns[:date_join].form_ui = :calendar

2017-02-06 Thread Sergio Cambra
gt; TQVM for a timely and very useful reply. > > Cheers ! > > On Monday, 6 February 2017 19:16:58 UTC+8, Sergio Cambra wrote: > > I don't think :calendar form_ui exists, you can use :date_picker if using > > jquery and added jquery-ui-rails to Gemfile, although in that case is

Re: embedded since rails 5.0.1

2017-02-06 Thread Sergio Cambra
t;active_scaffold_sortable",:git=>' > > https://github.com/activescaffold/active_scaffold_sortable.git' > > > > :-( > > > > Le lundi 6 février 2017 12:59:54 UTC+1, Sergio Cambra a écrit : > >> Are you using latest commit from master br

Re: embedded since rails 5.0.1

2017-02-06 Thread Sergio Cambra
Are you using latest commit from master branch? embedded param from url looks wrong, it should be: {"eid"=>"4c9a61f3feca0b56fdd50bb45f7ca6fa", "embedded"=>{"constraints"=>{"per_id"=>"311"}}, "adapter"=>"_list_inline_adapter"} I guess you get this error when click new in embedded scaffold,

Re: submit_text

2017-02-06 Thread Sergio Cambra
No, you need to override _update_form.html.erb partial for that controller: <% cancel_link = true if cancel_link.nil? %> <%= render :partial => "base_form", :locals => {:xhr => xhr ||= nil, :form_action => form_action ||= :update,

Re: Which PDF gem is most suited for usage with Active_scaffold ?

2017-02-06 Thread Sergio Cambra
I use prawn and prawn_rails gem, latter gem allows to use .pdf.prawn views https://github.com/Whoops/prawn-rails Or better prawn-rails gem, which is more updated, and pretty similar (my project is old and I started using prawn_rails gem long time ago) https://github.com/cortiz/prawn-rails In

Re: config.columns[:date_join].form_ui = :calendar

2017-02-06 Thread Sergio Cambra
ore error messages but config.columns[:date_join].form_ui = :calendar, > date_join did not display as a calendar :-( > Do I need to gem install another plugin ? > > On Friday, 3 February 2017 20:27:22 UTC+8, Sergio Cambra wrote: > > See answer for config.columns[:eno].descrip

Re: Which PDF gem is most suited for usage with Active_scaffold ?

2017-02-03 Thread Sergio Cambra
I usually use prawn for PDF too. However you can use whatever with ActiveScaffold, only setup action link with page: true or popup: true, not inline, and use send_data in controller action to send pdf content to browser. In rails you would send pdf to browser in same way without ActiveScaffold,

Re: config.columns[:date_join].form_ui = :calendar

2017-02-03 Thread Sergio Cambra
See answer for config.columns[:eno].description. All your issues about ActiveScaffold ignoring your settings must be the same. El jueves, 2 de febrero de 2017 19:38:57 (CET) Chee Chong Hwa escribió: > Hi Sergio > > config.columns[:date_join].form_ui = :calendar > I get the no implicit

Re: config.columns[:eno].description = "Employee #"

2017-02-03 Thread Sergio Cambra
Parameter in block is conf and you are using config. Replace config.columns with conf.columns, or change |conf| with |config|. I think your issue about activescaffold ignoring setting columns is the same. El jueves, 2 de febrero de 2017 20:16:44 (CET) Chee Chong Hwa escribió: > Fresh project

Re: Embedded Scaffolds broken ?

2017-02-02 Thread Sergio Cambra
I see config.actions.add :list commented, why is commented? or why did you need it? did you remove list action with ActiveScaffold.set_defaults? El miércoles, 1 de febrero de 2017 16:11:48 (CET) Gloufy escribió: > Hi, > > I do a bundle update and now I have this : > > > List is not enabled.

Re: active_scaffold_export crashes with Rails 5/ruby2.26+active_scaffold (master branch)

2017-02-01 Thread Sergio Cambra
Hi Sergio > > I am using 'naaano/active_scaffold_export' ... link from Active_Scaffold > wiki > > On Wednesday, 1 February 2017 19:11:44 UTC+8, Sergio Cambra wrote: > > active_scaffold_export 3.3.2 is outdated, it doesn't work with latest > > activ

Re: active_scaffold_export crashes with Rails 5/ruby2.26+active_scaffold (master branch)

2017-02-01 Thread Sergio Cambra
active_scaffold_export 3.3.2 is outdated, it doesn't work with latest activescaffold. Use github: 'naaano/active_scaffold_export' because no new version has been released yet El miércoles, 1 de febrero de 2017 0:12:58 (CET) Chee Chong Hwa escribió: > NoMethodError in EmployeesController#export

Re: |config| | block not respected

2017-02-01 Thread Sergio Cambra
El martes, 31 de enero de 2017 23:26:00 (CET) Chee Chong Hwa escribió: > Hi Sergio > > This does not work as all these 3 columns are displayed. Yes, I did stop and > restart server > > # config/initializers/active_scaffold.rbActiveScaffold.set_defaults do > |config| config.ignore_columns.add

Re: Active_Scaffold does not work after implementing RailCasr Episode #250

2017-02-01 Thread Sergio Cambra
Forget this, I didn't see your answer El miércoles, 1 de febrero de 2017 3:02:21 (CET) Sergio Cambra escribió: > I mean roles controller > > El miércoles, 1 de febrero de 2017, 12:00:56 (UTC+1), Sergio Cambra > > escribió: > > If you remove controller, does it work again? &

Re: Active_Scaffold does not work after implementing RailCasr Episode #250

2017-02-01 Thread Sergio Cambra
I mean roles controller El miércoles, 1 de febrero de 2017, 12:00:56 (UTC+1), Sergio Cambra escribió: > > If you remove controller, does it work again? > > El martes, 31 de enero de 2017, 11:43:54 (UTC+1), Sergio Cambra escribió: >> >> Please, explain in more detail.

Re: Active_Scaffold does not work after implementing RailCasr Episode #250

2017-02-01 Thread Sergio Cambra
If you remove controller, does it work again? El martes, 31 de enero de 2017, 11:43:54 (UTC+1), Sergio Cambra escribió: > > Please, explain in more detail. Which is not working? JS and CSS not being > loaded? Or something different. > > That's really old cast, so maybe y

Re: Active_Scaffold does not work after implementing RailCasr Episode #250

2017-01-31 Thread Sergio Cambra
Please, explain in more detail. Which is not working? JS and CSS not being loaded? Or something different. That's really old cast, so maybe you changed your javascript and stylesheet includes in your layout, with ones from railscast: <%= stylesheet_link_tag :all %> <%= javascript_include_tag

Re: Action Show to a email-body !

2017-01-30 Thread Sergio Cambra
css_class.concat(" #{column.css_class}") unless column.css_class.nil? > %> > <%= show_column_value(record, column) -%> > <% end -%> > > <% end -%> > > Le jeudi 17 décembre 2015 18:49:05 UTC+1, Sergio Cambra a écrit : > > Create

Re: Concern and controller

2017-01-23 Thread Sergio Cambra
roller active_scaffold :model do |conf| conf.create.columns = ... end end El lunes, 23 de enero de 2017 3:32:03 (CET) Gloufy escribió: > great ! but how to have for example config.create.columns=[] different > in each controller ? > > Le lundi 23 janvier 2017 11:44:25 UTC+1, Ser

Re: Concern and controller

2017-01-23 Thread Sergio Cambra
I haven't tried, but you can create a common controller and have other controllers inherit from it El domingo, 22 de enero de 2017 5:06:36 (CET) Gloufy escribió: > Hi, > > Does it possible to configure activescaffold in a concern and include it in > different controller ? > > I have different

Re: Is ActiveScaffoldBatch Rails 5 compatible?

2017-01-20 Thread Sergio Cambra
Yes, it needs to be changed to work with rails 5, similar changes was needed for field_search in ActiveScaffold. I have fixed in master branch. El jueves, 19 de enero de 2017 7:30:22 (CET) jsurr...@roirevolution.com escribió: > It seems that

Re: Error with inplace_edit

2017-01-09 Thread Sergio Cambra
) Benjamín Cárdenas Salamandra escribió: > El 04-01-2017 a las 10:41, Sergio Cambra escribió: > El miércoles, 4 de enero de 2017 5:21:13 (CET) bencarsal escribió: > Esteemed group, > > I try to implement the inplace_edit thereby: > in the controller: > > config.columns[:myc

  1   2   3   4   5   6   7   8   9   10   >