On Thu, Dec 28, 2017 at 5:39 PM, Craig Russell wrote:
> I don't mind the magic if I know it's magic.
>
> So what does module helpers mean? Is there also a helpers module that is
> included by default in addition to Sinatra::Helpers?
I'm not sure I understand the question. With Sinatra, the foll
Something like this?
projects =
pmcs.map {|pmc| [pmc, ASF::Committee.find(pmc).mail_list]}.to_h.
merge(ppmcs.map {|ppmc| [ppmc, ASF::Podling.find(ppmc).mail_list]}.to_h)
Note: ASF::Committee.find will never return nil (overall I consider
that a design flaw, but it will return back a committe
I don't mind the magic if I know it's magic.
So what does module helpers mean? Is there also a helpers module that is
included by default in addition to Sinatra::Helpers?
Craig
On Thu, Dec 28, 2017 at 1:37 PM, Craig Russell wrote:
> Dropping helpers. made it work.
>
> So is helpers a magic ru
I've refactored a bit and now have:
helpers do
def projectsForUser(userName)
pmcs = ASF::Committee.pmcs.map(&:name).sort
ppmcs =ASF::Podling.list
.select {|podling| podling.status == 'current'}
.map(&:name).sort
user = ASF::Person.find(userName)
committees = user.comm
On Thu, Dec 28, 2017 at 1:37 PM, Craig Russell wrote:
> Dropping helpers. made it work.
>
> So is helpers a magic ruby thing? I read about ApplicationHelper but that's
> not directly applicable.
Instead of multiple inheritance, Ruby has single inheritance
classes... and modules. Sinatra defines
Dropping helpers. made it work.
So is helpers a magic ruby thing? I read about ApplicationHelper but that's not
directly applicable.
Craig
> On Dec 28, 2017, at 4:11 AM, Sam Ruby wrote:
>
>>
>>
>> # get a complete list of PMC and PPMC names
>> @pmcs = helpers.pmcs()
>
> Drop 'helpers.'
On Wed, Dec 27, 2017 at 9:56 PM, Craig Russell wrote:
> Here's what I tried to make a function callable from multiple places:
>
> #
> # Server side setup for whimsy/project
> #
>
> require 'whimsy/asf'
>
> require 'wunderbar/sinatra'
> require 'wunderbar/vue'
> require 'wunderbar/bootstrap/theme'
What is the path name? That could be important.
Also AFAICT the file containing the helpers needs to be required by
the code that uses it.
On 28 December 2017 at 02:56, Craig Russell wrote:
> Here's what I tried to make a function callable from multiple places:
>
> #
> # Server side setup for wh
Here's what I tried to make a function callable from multiple places:
#
# Server side setup for whimsy/project
#
require 'whimsy/asf'
require 'wunderbar/sinatra'
require 'wunderbar/vue'
require 'wunderbar/bootstrap/theme'
require 'ruby2js/filter/functions'
require 'ruby2js/filter/require'
disab
On Sun, Dec 17, 2017 at 1:46 PM, Craig Russell wrote:
>
>> On Dec 16, 2017, at 6:34 PM, Sam Ruby wrote:
>>
>>> The code in the existing main.rb in get '/invite' sets several variables
>>> that will be useful in discuss and vote. DRY says this code should only be
>>> in one place. How can variab
On Sun, Dec 17, 2017 at 7:07 PM, Craig Russell wrote:
> One more thing.
>
> I want to use a radio button on the discuss form:
>
> (0) invite to submit an ICLA only
> (0) invite to become a committer only
> (0) invite to become a PMC member only
> (0) invite to become a committer and PMC member
>
>
One more thing.
I want to use a radio button on the discuss form:
(0) invite to submit an ICLA only
(0) invite to become a committer only
(0) invite to become a PMC member only
(0) invite to become a committer and PMC member
The vue control looks like:
One
Two
Picked: {{ picked }}
What is
> On Dec 16, 2017, at 6:34 PM, Sam Ruby wrote:
>
>> The code in the existing main.rb in get '/invite' sets several variables
>> that will be useful in discuss and vote. DRY says this code should only be
>> in one place. How can variables be shared among multiple get and post paths?
>
> Two ba
On Sat, Dec 16, 2017 at 7:18 PM, Craig Russell wrote:
> I'm starting to work on the project/discuss and project/vote stuff and have a
> few questions.
>
> I am having a hard time seeing the entire picture considering that some of
> the application runs on the server and some runs on the client.
14 matches
Mail list logo