similar to: split dates array with take_while does not work ?

Displaying 20 results from an estimated 7000 matches similar to: "split dates array with take_while does not work ?"

2013 Jan 07
4
JSON::ParserError in controller
Hi All I''m trying to build an application which requires to scrap information from a webpage. On trying to perform the action, I get an error while trying to convert the html data to JSON. Has anyone experienced this before and if so can you please tell me how to solve this problem ? Please see below for code snippet and error log. Thanks in advance Anush require
2012 Aug 30
4
how to change theme in rails 3.2.7
I''m using rails 3.2.7. I have few themes in my public/themes folder. For example in my theme-1 folder there is one index.html + style.css + few images (if required) At the time of registration user will select one theme. Now when the user will login that theme will display. I will use handle bar(http://handlebarsjs.com/) for data insertion. My main problem is that how
2013 Sep 04
7
Shift from mongrel to webrick
Hi Everyone I have installed mongrel gem and in my dev I can able to run my app on mongrel but If I want to shift to webrick how can I shift easily with out uninstalling the mongrel gem Thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send
2013 Mar 25
1
validates presence of foreign key fails in nested form
I''m using accepts_nested_attributes as follows: class Timesheet < ActiveRecord::Base attr_accessible :status, :user_id, :start_date, :end_date, :activities_attributes has_many :activities, dependent: :destroy has_many :time_entries, through: :activities accepts_nested_attributes_for :activities, allow_destroy: true end class Activity < ActiveRecord::Base attr_accessible
2012 Nov 02
4
How to test recaptcha in localhost?
Hi all, I follow All the steps for recaptcha , but i am confused how to test on my local host. Because when we register in google recaptcha it ask for domain URL, i stuck here. Q What should i enter in domain url ? Hope that you all understand the problem. Thanks Regards Fahim Babar Patel -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2013 Feb 06
5
rake db:migrate_plugins RAILS_ENV=production fails with "no such file to load -- initializer"
I''m running Redmine on Ruby, and attempting to load a new plugin. When I attempt to run the command: rake db:migrate_plugins RAILS_ENV=production It fails with this error: rake aborted! no such file to load -- initializer /var/www/redmine/config/boot.rb:65:in `require'' /var/www/redmine/config/boot.rb:65:in `load_initializer'' /var/www/redmine/config/boot.rb:43:in
2013 Oct 21
6
I think I've found a mistake in Rails tutorial
At the point of this section *http://ruby.railstutorial.org/chapters/sign-up#sec-signup_failure*<http://ruby.railstutorial.org/chapters/sign-up#sec-signup_failure> clicking the "Create my account" button on the signup form shows the following image at <http://ruby.railstutorial.org/images/figures/signup_failure_rails_4.png> According to the tutorial, I must modify
2006 Aug 11
2
Array#chunk method, maybe someone will find this useful
class Array # break an array up into <size> chunks def chunk(size=1) return self if self.empty? raise ArgumentError if !size.kind_of? Integer y = self.length.divmod(size) rows = (y[1] > 0) ? y[0] + 1 : y[0] arr = Array.new(rows) (0...rows).each do |i| arr[i] = self.slice(size*i, size) end (arr.last.length...size).each { |i| arr.last[i] = nil }
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2013 Jul 04
4
localhost:­3000
My third post here. I''m learning Rails. getting Oops! Google Chrome could not connect to localhost:3000 I reinstalled Ruby and Rails. I create the Rails new ???? then run Rails S or Rails server. still cant get the localhost:3000 to start. I''m running Windows 8.1 Ruby version 2.0.0p0 Rails 4.0.0 -- You received this message because you are subscribed to the Google
2013 Feb 03
4
Create a helper for models and views?
Hi! If I have a method that is useful in both models and in views, where would be the appropriate place to put it? The method in question just takes two dates as strings, tries to parse them and returns all dates in the range between them. It also takes care of the issues when the dates are badly formatted etc etc.. This method is being used in several models (so a simple class method in
2012 Dec 03
2
Stop User from Changing URL
I have an authentication and autherization system built on the same lines outlined by Michael Hartl, rails tutorial. Here is the employees_controller.rb: class EmployeesController < ApplicationController before_filter :signed_in_employee, only: [:index, :edit, :update] before_filter :correct_employee, only: [:edit, :update] etc etc
2013 Oct 12
3
Assets not loading in production
Hello, (Rails 4, Ruby 2) I am trying to deploy my first rails app in a production environment, but cannot get the assets to load. The site is hosted on Webfaction, they advise to create a "static app" to serve the assets which I have done. But I don''t understand how my rails app then knows about the static app. At the moment, in production inside the head it prints out...
2012 Oct 06
2
Rails API Doc for Mail::Message?
Hi, I am very new to Rails. I am trying to delete an email that I have retrieved from a pop3 account. I googled around but couldn''t find any thing on that topic. I couldn''t find any API Doc either. What do I need to do to delete an email? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2013 Aug 29
4
Weird behaviour using ssl connection (OpenSSL::SSL::SSLError)
Hi guys when I execute the piece of code bellow on RoR console it works fine: url = URI.parse("https://us1.api.mailchimp.com/2.0/helper/ping") request = Net::HTTP::Post.new(url.path) http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request.body = "{\"apikey\": \"myapikey\"}" response = http.start
2012 Oct 31
2
What is Formtastic and SimpleForm gem ? Is any one of this is by default included in Rails ?
Hi all, I read Formtastic and SimpleForm gem. I am using 3.4 Q 1 Is any one of this is by default included in Rails ? Q2 Any advantage of this gems over simple form tags ? As per my knowledge we are using form helper , but still i raised the qustion ? Thanks Regards Fahim Babar Patel -- You received this message because you are subscribed to the Google Groups "Ruby
2013 Oct 18
3
before_action - performing an action to prevent
class WebsocketController < WebsocketRails::BaseController private def authenticate? unless current_user.token == message[:token] current_redirect_to ''home/index'' false # that here we need to do to stop the further execution? end end end class WorldsController < WebsocketController before_action :authenticate? def index
2012 Aug 31
5
Question1 Cucumber Rails
can we write multiple background in one feature file....? can we write multiple feature in one feature file.....? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2012 Oct 11
4
what;s the right url in this case
Hello, I have this models class Berichten < ActiveRecord::Base attr_accessible :bericht, :user belongs_to :user belongs_to :Category end class User < ActiveRecord::Base attr_accessible :email, :name has_many :berichten end class Category < ActiveRecord::Base attr_accessible :id :name has_many :berichten end What I wonder is what the right url is when I want to place a
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
I''m trying to create a folder right after a user registers, so I override the create action on the registration controller (devise) but I don''t know how to access the newly created user in order to create the folder with it''s name to upload files later. So far I''ve got this: class RegistrationsController < Devise::RegistrationsController def new