Hello,
I have created an array of time slots as strings and am trying to
display them in a form to be selected upon creation.
This is my Appointments controller file.
helper_method :timeslots
def timeslots
@timeslots = ['8:30 AM','9:00 AM','9:30 AM','10:00 AM','10:30
AM','11:00
sure.
posts_controller.rb
...
private
def post_params
params.require(:post).permit(:title, :body)
end
class CreatePosts ActiveRecord::Migration
def change
create_table :posts do |t|
t.string :title
t.text :body
t.integer :user_id
t.timestamps
end
sure.
posts_controller.rb
...
private
def post_params
params.require(:post).permit(:title, :body)
end
class CreatePosts ActiveRecord::Migration
def change
create_table :posts do |t|
t.string :title
t.text :body
t.integer :user_id
t.timestamps
end
sure.
posts_controller.rb
...
private
def post_params
params.require(:post).permit(:title, :body)
end
class CreatePosts ActiveRecord::Migration
def change
create_table :posts do |t|
t.string :title
t.text :body
t.integer :user_id
t.timestamps
end
def comment_params
params(:comment).merge!(:user_id = params[:user_id])
params.require(:comment).permit(:body, :user_id)end
On Mon, Dec 1, 2014 at 4:29 PM, Psycho Shine anndre...@gmail.com wrote:
sure.
posts_controller.rb
...
private
def post_params
Each / Each with index returns the same array . You need to use map.
http://stackoverflow.com/questions/11596879/why-does-arrayeach-return-an-array-with-the-same-elements
Can you try this
%= select obj, test, @timeslots.map.with_index{ |name, index| [name,
index] } %
On Mon, Dec 1, 2014 at
Hi,
I'm currently looking for a Ruby developer looking to move to a new
senior role or move into a senior position.
My client works with a number of exciting technologies on top of Ruby
such as Python, GreenplumDB and perl.
You would be joining a very passionate team in the healthcare sector.
I have a view where I have multiple things to load and I make an ajax call
from the index view to add the content on success of each call and I would
like to cache each of it so as to make the performance better.
*index.html.erb*
div id=show1
/div
script
$.ajax({
type : GET,
Hi there,
I am trying to figure out how to do something in Rails.
Here's the situation:
I want to store in the DB (as fields) info found in a text file. I've
created a ruby scripted, where I isolate the area with the text I
want(just to test, or play around).
I need a guideline on the
Vivek Sampara wrote in post #1163711:
%= select obj, test, @timeslots.map.with_index{ |name, index|
[name,
index] } %
On Mon, Dec 1, 2014 at 3:58 PM, Dmoneyzzz Darko li...@ruby-forum.com
Thanks, it worked
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you
You have to use fragment caching
http://api.rubyonrails.org/classes/ActionController/Caching/Fragments.html
and write a private method like
def sample_from_cache
@cache = read_fragment(:page = params[:page], :per_page = @per_page)
return @cache unless @cache.blank?
@cache =
Hi George,
Isolate the area with the text you want , example ?
Ideally it looks like you have to grab a book of regular expressions.
Cheers
Vivek
On Mon, Dec 1, 2014 at 4:42 PM, George Stoumpos stog...@gmail.com wrote:
Hi there,
I am trying to figure out how to do something in Rails.
Hi,
New to ruby development so wondering if someone could help...
I have this code in a file1.rb
#file1.rb
module GG
class GG
::NAME = 'gginfrausermanager'
end
end
and want to call this variable in another file2.rb with the following code:
#file2.rb
require './file1.rb'
include GG
p
Jamie,
As discussed in this thread:
https://groups.google.com/forum/#!searchin/rubyonrails-talk/job$20postings/rubyonrails-talk/oIdG8XLkmHE/hjZt7HKyfxQJ
this list has consensuses that job postings should have [JOB] in the subject
line. (This is also in the Google groups description as well).
On Dec 1, 2014, at 6:12 AM, George Stoumpos stog...@gmail.com wrote:
Hi there,
I am trying to figure out how to do something in Rails.
Here's the situation:
I want to store in the DB (as fields) info found in a text file. I've created
a ruby scripted, where I isolate the area with the
Hi again
Isolate the area with the text you want , example ?
This is how:
def read_file(file_name)
temp = File.open(file_name, r).read
data = temp.split(\n)
lookup_item = temp.match(/\tSystem Information/)
puts lookup_item.to_s + --lookup item
@my_match =
Hello,
I did all the steps from the Hartl tutorial but as soon as I do this :
User.create(name: Michael Hartl, email: mha...@example.com,password:
foobar, password_confirmation: foobar)
on the rails console, I see this error message :
NoMethodError: undefined method `password_digest='
On Dec 1, 2014, at 10:32 AM, Roelof Wobben rwob...@hotmail.com wrote:
Hello,
I did all the steps from the Hartl tutorial but as soon as I do this :
User.create(name: Michael Hartl, email: mha...@example.com,password:
foobar, password_confirmation: foobar)
on the rails console, I
I have exactly what Hartl says.
He says to change my gem file to this :
source 'https://rubygems.org'
gem 'rails','4.2.0.rc1'gem 'bcrypt', '3.1.7'
And there is no mention about bcrypt-rubt
Roelof
Op maandag 1 december 2014 16:40:41 UTC+1 schreef Walter Lee
It may have been renamed since the example I looked at. I haven't used 4.2 yet.
(Okay, just checked, and it is the way you describe -- same version, even -- in
4.1. Sorry for the noise.)
Walter
On Dec 1, 2014, at 10:44 AM, Roelof Wobben rwob...@hotmail.com wrote:
I have exactly what Hartl
On 1 December 2014 at 15:38, Walter Lee Davis wa...@wdstudio.com wrote:
On Dec 1, 2014, at 10:32 AM, Roelof Wobben rwob...@hotmail.com wrote:
Hello,
I did all the steps from the Hartl tutorial but as soon as I do this :
User.create(name: Michael Hartl, email: mha...@example.com,password:
On 1 December 2014 at 15:44, Roelof Wobben rwob...@hotmail.com wrote:
I have exactly what Hartl says.
He says to change my gem file to this :
source 'https://rubygems.org'
gem 'rails','4.2.0.rc1'
gem 'bcrypt', '3.1.7'
Did you run bundle install after that?
Yep, I did all the steps.
Here is my scheme.rb file :
# encoding: UTF-8
# This file is auto-generated from the current state of the database.
Instead
# of editing this file, please use the migrations feature of Active Record
to
# incrementally modify your database, and then regenerate this
On 1 December 2014 at 15:51, Roelof Wobben rwob...@hotmail.com wrote:
Yep, I did all the steps.
Though have not responded to my request that you do not top post. :(
So your Gemfile is exactly the same as in the tutorial? If you think
so then please post it here, along with Gemfile.lock
Colin.
Op maandag 1 december 2014 17:15:06 UTC+1 schreef Colin Law:
On 1 December 2014 at 15:51, Roelof Wobben rwo...@hotmail.com
javascript: wrote:
Yep, I did all the steps.
Though have not responded to my request that you do not top post. :(
So your Gemfile is exactly the same as in the
On 1 December 2014 at 16:20, Roelof Wobben rwob...@hotmail.com wrote:
Op maandag 1 december 2014 17:15:06 UTC+1 schreef Colin Law:
On 1 December 2014 at 15:51, Roelof Wobben rwo...@hotmail.com wrote:
Yep, I did all the steps.
Though have not responded to my request that you do not top
Op maandag 1 december 2014 17:39:01 UTC+1 schreef Colin Law:
On 1 December 2014 at 16:20, Roelof Wobben rwo...@hotmail.com
javascript: wrote:
Op maandag 1 december 2014 17:15:06 UTC+1 schreef Colin Law:
On 1 December 2014 at 15:51, Roelof Wobben rwo...@hotmail.com wrote:
On 1 December 2014 at 17:04, Roelof Wobben rwob...@hotmail.com wrote:
Op maandag 1 december 2014 17:39:01 UTC+1 schreef Colin Law:
On 1 December 2014 at 16:20, Roelof Wobben rwo...@hotmail.com wrote:
Op maandag 1 december 2014 17:15:06 UTC+1 schreef Colin Law:
On 1 December 2014 at
Op maandag 1 december 2014 18:12:56 UTC+1 schreef Colin Law:
On 1 December 2014 at 17:04, Roelof Wobben rwo...@hotmail.com
javascript: wrote:
Op maandag 1 december 2014 17:39:01 UTC+1 schreef Colin Law:
On 1 December 2014 at 16:20, Roelof Wobben rwo...@hotmail.com wrote:
Good day to all..hoping to grab someone's ear on this as I have a
friend in NYC who is CTO at a new start-up that is doing very
well..tons of upside.
They need two Ruby devs to take the site to the next level. Spots are perm
with base plus bonus and perks. Latest and greatest with
On Monday, December 1, 2014 2:07:58 PM UTC, trekr67 wrote:
[snip]
::NAME = 'gginfrausermanager'
[snip]
and want to call this variable in another file2.rb with the following code:
#file2.rb
require './file1.rb'
include GG
p #{GG::NAME} is called from file1.rb
However when I do a
Hello,
Currently, my issue is that I cannot see the values I have selected in
my Appointment form. This is the code in my appointments/form.html.erb.
div class=field
%= f.label :appointment_time %br
%= select obj, test, timeslots.map.with_index{ |name, index|
[name,
index] } %
On Mon, Dec 1, 2014 at 2:33 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
Currently, my issue is that I cannot see the values I have selected in
my Appointment form.
I have this in the appointments/show.html.erb:
%= @appointment.appointment_time %
So what do you see there? Use
Hassan Schroeder wrote in post #1163781:
On Mon, Dec 1, 2014 at 2:33 PM, Dmoneyzzz Darko li...@ruby-forum.com
wrote:
So what do you see there? Use `view source`.
The likely cause of missing values is either
1) the values were never inserted into the DB to start with
or
2) you're not
On Mon, Dec 1, 2014 at 4:40 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
Hello, I reviewed my seeds.rb, development log, and looked throughout my
project and I have come to the conclusion that my values are not sent to
the db.
Wrong answer. Open a console and look. You can use `dbconsole`
Hassan Schroeder wrote in post #1163795:
On Mon, Dec 1, 2014 at 4:40 PM, Dmoneyzzz Darko li...@ruby-forum.com
wrote:
use the rails console to examine e.g. Appointment.last.
Hassan Schroeder hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
On Mon, Dec 1, 2014 at 6:15 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
I ran the rails console and entered Appointment.last and found that
these three fields were entered into the database as nil even though
they were selected in the Appointment form.
#Appointment id: 22, patient_id: 8,
Hassan Schroeder wrote in post #1163800:
On Mon, Dec 1, 2014 at 6:15 PM, Dmoneyzzz Darko li...@ruby-forum.com
wrote:
out how to get the select in the form to create and update info to send
to the db.
You should look at the log file to see exactly what parameters are
being sent to your
On Mon, Dec 1, 2014 at 6:30 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
[1m[35mSQL (1.0ms)[0m INSERT INTO physicians
These are the parameters that are being transferred to the db. So now I
need to find the location of these parameters in my controller, right?
Uh, well. You were talking
Hassan Schroeder wrote in post #1163802:
On Mon, Dec 1, 2014 at 6:30 PM, Dmoneyzzz Darko li...@ruby-forum.com
wrote:
These are the parameters that are being transferred to the db. So now I
need to find the location of these parameters in my controller,
Maybe there's another
more pertinent
On Mon, Dec 1, 2014 at 7:34 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
TO appointments
(id,patient_id,appointment_date,created_at,updated_at,physician_id,reason,notes,diagnostic_id,diagnostic_code_id,appt_completion,appointment_time)
VALUES (22, 8, '2014-12-01', '2014-12-01
Hassan Schroeder wrote in post #1163806:
On Mon, Dec 1, 2014 at 7:34 PM, Dmoneyzzz Darko li...@ruby-forum.com
wrote:
TO appointments
(id,patient_id,appointment_date,created_at,updated_at,physician_id,reason,notes,diagnostic_id,diagnostic_code_id,appt_completion,appointment_time)
VALUES
On Dec 1, 2014, at 10:02 PM, Dmoneyzzz Darko li...@ruby-forum.com wrote:
In particular, these parameters do
not contain appointment_time but I am sure I added the column
respectively.
The parameters reflect what's coming from the browser, what is submitted with
the form. So this has
Our client specializes in solving complex technical problems in the film
and TV broadcasting industries by creating value through the manual
automatic curation of hidden content in archives, studios and
broadcasting businesses generating new revenue streams for our
customers. This is a
Our client is seeking for candidates for a Senior Ruby on Rails
Developer position.
Primary Skills:
ROR, HTML5, CSS3, and JavaScript, GitHub
Description:
• Senior 8 to 12 years experienced developer who can do hands-on coding
• Should have experience building / designing / developing products
•
45 matches
Mail list logo