[Rails] Re: Form is not saving data upon submission

2016-03-08 Thread David Williams
After attempting to create a record in the console. I get the output below (0.5ms) begin transaction Article Exists (0.0ms) SELECT 1 AS one FROM "articles" WHERE ("articles"."id" != 12) AND "articles"."slug" = ? LIMIT 1 [["slug", "wow-the-movie-was-great"]] (0.0ms) rollback transac

Re: [Rails] Rails 5.0.0.beta3 thinks it is in production mode when it isn't.

2016-03-08 Thread Donald Ziesig
Hi Colin, This seems to be a combination of problems. I did a git diff between the master branch (which worked correctly - up to the place where I was coding) and the working branch (which was NOT working ;-) ). There was nothing unusual, only 4 files changed and nothing that would cause Rail

[Rails] Form is not saving data upon submission

2016-03-08 Thread David Williams
When I click the submit button, the form automatically refreshes the page. The console doesn't show any errors related to strong parameters as stated below. I will post the controller, _form view and model information Started GET "/articles/new?utf8=%E2%9C%93&authenticity_token=GP%2Fm4GX2Z2CUjuFt5

[Rails] Re: Using the Preview Add-on for Ckeditor

2016-03-08 Thread David Williams
I went into the gem's directory to add a plugins folder app/assets/javascript/ckeditor/plugins I then added preview.js to it. Afterwards, I added //= require ckeditor/plugins/preview.js to ckeditor\application.js. Lastly, I added config.extraPlugins = 'preview'; to config.js. I still don't

[Rails] Using the Preview Add-on for Ckeditor

2016-03-08 Thread David Williams
I have the 'ckeditor' gem installed, but I'm trying to also add a preview pane for users to see the output of their HTML document/formatting. The gem's documentation tells you everything but how to add new plugins. http://ckeditor.com/addon/preview https://github.com/galetahub/ckeditor Can you s

Re: [Rails] system command and echo strangeness

2016-03-08 Thread Colin Law
On 8 March 2016 at 16:38, nanaya wrote: > Hi, > > On Wed, Mar 9, 2016, at 01:02, Hassan Schroeder wrote: >> On Tue, Mar 8, 2016 at 7:48 AM, Colin Law wrote: >> >> > Which implies that when I do not specify the path it is using a >> > different version of echo. >> >> It is - google "bash builtin c

Re: [Rails] system command and echo strangeness

2016-03-08 Thread nanaya
Hi, On Wed, Mar 9, 2016, at 01:02, Hassan Schroeder wrote: > On Tue, Mar 8, 2016 at 7:48 AM, Colin Law wrote: > > > Which implies that when I do not specify the path it is using a > > different version of echo. > > It is - google "bash builtin commands" (assuming you're using bash > as your def

Re: [Rails] system command and echo strangeness

2016-03-08 Thread Hassan Schroeder
On Tue, Mar 8, 2016 at 7:48 AM, Colin Law wrote: > Which implies that when I do not specify the path it is using a > different version of echo. It is - google "bash builtin commands" (assuming you're using bash as your default shell). -- Hassan Schroeder hassan.schroe.

Re: [Rails] system command and echo strangeness

2016-03-08 Thread Walther Diechmann
what does ruby -e "system 'which echo’" tell you? /Walther > Den 8. mar. 2016 kl. 16.48 skrev Colin Law : > > Can anyone explain this? > > If in a terminal I run echo -e 'hello' I see, as one would expect, > $ echo -e 'hello' > hello > > However if I execute the command using irb I see > $

[Rails] system command and echo strangeness

2016-03-08 Thread Colin Law
Can anyone explain this? If in a terminal I run echo -e 'hello' I see, as one would expect, $ echo -e 'hello' hello However if I execute the command using irb I see $ irb 2.1.3 :001 > system "echo -e 'hello'" -e hello => true It echoes the option which suggests to me that echo does not recognis

Re: [Rails] How to create Facebook API for publishing post?

2016-03-08 Thread Hassan Schroeder
On Mon, Mar 7, 2016 at 10:55 PM, kanna wrote: > How to create API for publishing post to Facebook. ? That's Facebook's job, and they've already done it. Your role is 1) read the API documentation, and 2) interact with it from your code, possibly using an existing library ( which could be fo

[Rails] Thinning controllers for easier unit testing and separation of concerns

2016-03-08 Thread L. Preston Sego III
I wrote this gem, https://github.com/NullVoxPopuli/skinny_controllers which is influenced by Trailblazer, but less with some different opinions here and there. The main idea that it pulls out of trailblazer is operations and policies. Operations are in `app/operations` Policies are in `app/poli

Re: [Rails] Re: Sorry, you are not allowed to access that page

2016-03-08 Thread Colin Law
On 8 March 2016 at 09:07, Naveed Alam wrote: >> >> Am I right in thinking that you are an inexperienced developer who has >> been given the job of maintaining an existing app? If so then I think >> it would be well worth your while taking some time out to learn the >> basics of rails before conti

[Rails] Re: Sorry, you are not allowed to access that page

2016-03-08 Thread Naveed Alam
> > Am I right in thinking that you are an inexperienced developer who has > been given the job of maintaining an existing app? If so then I think > it would be well worth your while taking some time out to learn the > basics of rails before continuing. If you are being employed to do > this then

Re: [Rails] Sorry, you are not allowed to access that page

2016-03-08 Thread Colin Law
On 8 March 2016 at 07:38, Naveed Alam wrote: > Dear friends, > > I have a method named show_rosterduty in employee controller and and a > view name show_rosterduty.html.erb > > in the authorization_rules I already set the name of method along with > other methods of employee, means below the metho

Re: [Rails] Rails 5.0.0.beta3 thinks it is in production mode when it isn't.

2016-03-08 Thread Colin Law
On 8 March 2016 at 05:14, Donald Ziesig wrote: > Hi All! > > Another problem. I am using Rails 5.0.0.beta3 with a minor javascript file > (115 lines). I have encountered the following problem several times in the > past two days. In both earlier cases, I ended up returning to the master > branc

Re: [Rails] Re: Beginner Question

2016-03-08 Thread Colin Law
Please quote the previous message when replying. This is a mailling list not a forum, though you may be accessing it via a forum like interface, so it is important to quote so we know what you are replying to. See further comments below. On 8 March 2016 at 01:03, Hitesh Sancheti wrote: > This i

Re: [Rails] Re: First Steps with Ruby

2016-03-08 Thread Colin Law
On 7 March 2016 at 23:36, John Lahr wrote: > > If you want to learn Ruby, than learn Ruby. Learning Rails is not the same > as learning Ruby. I suggest anyone who wants to learn Rails learn Ruby > first because that's what Rails is built on. There are numerous options for > learning Ruby, you c