I want to trace my rails application such as who created the data,who made the changes with that and what is its old and new value. Let me know which gem is suitable for that.I'm using paper_trail but not able to see the changes.
Try Audit_log gem. And check here and here also for better understanding
You can use Audit Rails gem too for this.
Related
I am trying to understand some of the higher level functioning of Rails, using the Rails console. I run controller.class.superclass.superclass which gives ActionController::Base, controller.class.superclass.superclass.superclass which gives ActionController::Metal and controller.class.superclass.superclass.superclass.superclass gives AbstractController::Base.
I have found these in the API documentation.
http://api.rubyonrails.org/classes/AbstractController/Base.html
http://api.rubyonrails.org/classes/ActionController/Metal.html
[can only post two links]
I can add to these simply by declaring the classes again in the console, but is there a way to find the original Ruby code for these and to inspect and edit it in its original file(s)? Just in case I need to know the full contents of these for future.
You can also do:
bundle show <gem>
and that will show you where the gem is on your system. Editing in those files is not advised unless you know how to re-install gems.
You can see the Rails source code on Github:
https://github.com/rails/rails/tree/master/actionpack/lib/action_controller
I'm using ember-rails with ember-source and ember-data-source. But somehow the activemodel-adapter is not included in either of the gems. Or I'm missing something. I also searched bower, and can't find any. The code seems to be at: https://github.com/emberjs/data/tree/master/packages/activemodel-adapter
But it also needs compile. I'm wondering if there is an easier way to use it.
You must explicitly load a recent version of Ember Data. For example, add a version to the ember-data-source gem in your Gemfile:
gem 'ember-data-source', '~> 1.0.0.beta.7'
The active model adapter is included with Ember Data. Assuming everything in your project is global you could use it for your entire application like so:
App.ApplicationAdapter = DS.ActiveModelAdapter;
I need the functionality provided by the rails_sql_views gem. However it looks like the last commit for this gem was made in 2010. Has this project been outdated by a new project? I'd like to find an active gem to use to get this functionality.
http://activewarehouse.rubyforge.org/rails_sql_views/
http://rubygems.org/gems/rails_sql_views
After further research here is a Rails 3 candidate for similar functionality:
https://github.com/bradphelan/Active-Illusion
This is a gem of this blog post:
http://xtargets.com/2011/08/02/tableless-views-with-active-record/
However this solution doesn't seem to be very popular.
schema_plus gem has create_view method that seems compatible (although I'm not familiar with rails_sql_views).
barancw, I needed this gem for our product using Rails 3.2.5, so I forked the repo and updated the necessary pieces. This gem is great for improving the performance of our large database queries, as it reduces the need to load objects into memory. I combined this gem with another optimization: Rails - given an array of Users - how to get a output of just emails?
https://github.com/ryanlitalien/rails_sql_views
Original documentation: http://rubydoc.info/gems/rails_sql_views/0.8.0/frames/index
Please keep in mind the docs are a bit outdated ("require_gem" has been replaced with "gem" and add the gem to your Gemfile as well).
I want to compare them: both of gems have advantages and disadvantages.For example in client_side_validations more clear and more Ruby to create custom notifications,BUT I have problems with its installation Can't include js file for client slide validation . It is very big minus for me)
jCheck more beatiful, but I need to use more jQuery to use it.
One more: I can't get where all notifications (jCheck) are stored ?
I want to ask : what gem is better for you ?
Depending upon what version of Rails you are using will determine if you can use ClientSideValidations. I haven't had the free time to complete the Rails 3.2 update. Very sorry.
I want to use the code of a gem as my main application code instead of just installing it with "bundle install".
How can I create an entire rails app based on a gem and using that gem as my app?
Thank you.
You are looking for Rails Engines instead I believe. If not, then can you explain your problem further?