By upgrading rails from 4.2.1 to 5.1.0 getting deprecation warning on using as status_changed? DEPRECATION WARNING: The behavior of attribute_changed? inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_change_to_attribute? instead. I don't want to replace on in my project . I think should override method. Anybody knows how to do it. Please help

Member Avatar
+0 forum 0

I understand how to generate objects from the database, using Sinatra with formatting, and I understand from tutorials how to use POST to send information back, but I don't understand how to use POST to transfer information from the browser (for instance from a text field, or inside <p id="stufftotransfer"><%= @stuff.each do || stuff.name %></p>) back to the database and store it to show it's working. Basically in Sinatra, if you want to display something as output you do something like this -> application_controller.rb get '/items' do erb :items #for example end #Actually this is items.erb for instance. I can't …

Member Avatar
Member Avatar
+0 forum 1

I am implementing **Attribute Based Access Control** in angular typescript application with rails server. I've searched for different solutions like followings but could not manage to implement cause of unclear solutions. 1. [Custom Roles Based Access Control RBAC in ASP NET](https://www.codeproject.com/Articles/875547/Custom-Roles-Based-Access-Control-RBAC-in-ASP-NET) 2. [simple attribute based access control with spring](https://dzone.com/articles/simple-attribute-based-access-control-with-spring) The solution points to create a method for checking objects and its permissions list like this public boolean check(Object subject, Object resource, Object action, Object environment) 1. Subject is the entity (mostly a user) that requests access 2. Resource is the entity to be accessed (e.g. file, database record, Store Information, …

Member Avatar
Member Avatar
+0 forum 5

I am new to Ruby On Rails. I am facing truble on creating a long running background job. my target is to send notification to all the active users between two given dates on specific given hour interval. Example: **send notification message after every 8 hours to all active users from March-9, 2016 to June-29, 2016** I already tried this with gem 'sidekiq', '~> 4.1' and succefully performed active job. but I am not able to schedule it. I also tried gem 'whenever', :require => false but it creates static crone job which constantly run on spcific time interval. not …

Member Avatar
+0 forum 0

I am a newbie programming Ruby. I have the below code. Method sum_to_n? which takes an array of integers and an additional integer, n, as arguments and returns true if any two elements in the array of integers sum to n. It should return true for the empty array with zero argument, but keeps returning false. def sum_to_n? (arr, n) hash = Hash.new(0) arr.each do |val| if hash.key? val return true else hash[n-val] = val end end return false end What am I doing wrong ?

Member Avatar
Member Avatar
+0 forum 9

hello it's been awhile .. it's my first time using ruby(on Rails), and i've downloaded what is needed(i think, based on my searches), Ruby, Rails and gem, but i'm not sure if they are properly installed because they don't seem to appear (?) Also it's my first time using Aptana, i have all these to create a project using Ruby on Rails as server and JS for the coding .. hopefully i can finish this by tomorrow .. thanks!

Member Avatar
Member Avatar
+0 forum 1

after pulling my hair out with this one, I'm afraid I'm going to have to turn the knowledge of those much wiser.....again! ok so here's the problem, I am following the following two railscasts: [deploying to a vps](http://railscasts.com/episodes/335-deploying-to-a-vps?autoplay=true) [asset pipeline in production](http://railscasts.com/episodes/341-asset-pipeline-in-production?autoplay=true) My setup: Ubuntu Server 12.04 nginx unicorn ruby 1.9.3p125 rails 3.2.2 Ad far as I can tell everything has been followed to a T (or Tea or maybe a Tee, I've never seen this phrase written down before). The site is now running on my server but the stylesheet and javascript files are not loaded. it seems to …

Member Avatar
Member Avatar
+0 forum 5

I am currently developing a search engine and I have some implemented algorithms that are written in Java but also I need to get some Database communication which is easy thing in Ruby an Rails. Thus, Is there any way to use both language in the web application development Regards :)

Member Avatar
Member Avatar
+0 forum 1

Below is the ERB for a new 'To-do' view. Duedate is another table that holds date objects, and there is an association between duedates and todos with a 'duedate_id' in the todo table. Right now there is just a dropdown for any externally created duedates. While creating a new todo, I would like the option to EITHER select a previously created duedate from the drop-down menu or create a new duedate on the spot, and then be able to select it from the dropdown list. Is this possible? [CODE] <h1>New todo</h1> <% form_for(@todo) do |f| %> <%= f.error_messages %> <p> …

Member Avatar
Member Avatar
+0 forum 1

Hello I have a rails application where I have to subtract 2 time stamps and display the result on the webpage I have used the following sql statement and I am getting the results. [CODE]select (julianday(resolutions.created_at)-julianday(tickets.created_at))*24 from tickets,resolutions[/CODE] the value of tickets.created_at is 2010-04-05 18:59:02 which is a time stamp and value of resolutions.created_at is 2010-04-08 08:10:33 Now where do I put this sql so that I can be seen in my webpage. I tired it in the views page with the following but nothing showed up: [CODE]<% @sql = "select (julianday(resolutions.created_at)-julianday(tickets.created_at))*24 from tickets,resolutions" %> <% @t=(ActiveRecord::Base.connection.execute(@sql)) %>[/CODE] So how …

Member Avatar
Member Avatar
+0 forum 1

hello, i want to run a ruby on rails application through apache web server via phusion passenger, i followed everything written in the guide and every guide and im still having a problem i really could use help, i spent two days on it and i am getting frustrated, when i try to access my application using web browser i am always faced with this error : ' 403 forbidden You don't have permission to access / on this server" i tried everything i changed the permissions of every file and folder, i looked over the net and i found …

Member Avatar
+0 forum 0

[URL="http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/"]Multiple arbitrary code execution vulnerabilities in Ruby[/URL] have been revealed by the [URL="http://www.apple.com/support/security/"]Apple Product Security[/URL] team which could lead to Denial of Service attacks. A total of five vulnerabilities have been reported, with versions impacted being: [INDENT]1.8.4 and all prior versions 1.8.5-p230 and all prior versions 1.8.6-p229 and all prior versions 1.8.7-p21 and all prior versions 1.9.0-1 and all prior versions[/INDENT] Upgrading to either 1.8.5-p231, 1.8.6-p230, 1.8.7-p22 or 1.9.0-2 is recommended. This is, of course, of particular interest to Apple as its Mac OS X Leopard comes complete with a Ruby on Rails web development framework. For an in-depth examination …

Member Avatar
+1 forum 0

The End.